rb: require 'thrift' first in generated service definitions [THRIFT-38]
authorKevin Clark <kclark@apache.org>
Tue, 24 Jun 2008 01:05:51 +0000 (01:05 +0000)
committerKevin Clark <kclark@apache.org>
Tue, 24 Jun 2008 01:05:51 +0000 (01:05 +0000)
From kevin@rapleaf.com

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@670979 13f79535-47bb-0310-9956-ffa450edef68

compiler/cpp/src/generate/t_rb_generator.cc
lib/rb/benchmark/gen-rb/BenchmarkService.rb
lib/rb/spec/gen-rb/NonblockingService.rb

index 4336f65..786c9cd 100644 (file)
@@ -581,6 +581,7 @@ void t_rb_generator::generate_service(t_service* tservice) {
 
   f_service_ <<
     rb_autogen_comment() << endl <<
+    "require 'thrift'" << endl <<
     rb_imports() << endl;
 
   if (tservice->get_extends() != NULL) {
@@ -589,7 +590,6 @@ void t_rb_generator::generate_service(t_service* tservice) {
   }
 
   f_service_ <<
-    "require 'thrift'" << endl <<
     "require '" << program_name_ << "_types'" << endl <<
     endl;
 
index ff4b10a..c66f8c0 100644 (file)
@@ -4,8 +4,8 @@
 # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
 #
 
-require 'thrift/protocol'
 require 'thrift'
+require 'thrift/protocol'
 require 'Benchmark_types'
 
     module ThriftBenchmark
index ba6b3e4..43273ec 100644 (file)
@@ -4,8 +4,8 @@
 # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
 #
 
-require 'thrift/protocol'
 require 'thrift'
+require 'thrift/protocol'
 require 'ThriftSpec_types'
 
     module SpecNamespace