From 3836f9ba355e98ebe5bb9970f830bb7baa29bf22 Mon Sep 17 00:00:00 2001 From: Kevin Clark Date: Tue, 24 Jun 2008 01:05:51 +0000 Subject: [PATCH] rb: require 'thrift' first in generated service definitions [THRIFT-38] 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 | 2 +- lib/rb/benchmark/gen-rb/BenchmarkService.rb | 2 +- lib/rb/spec/gen-rb/NonblockingService.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/compiler/cpp/src/generate/t_rb_generator.cc b/compiler/cpp/src/generate/t_rb_generator.cc index 4336f658..786c9cd7 100644 --- a/compiler/cpp/src/generate/t_rb_generator.cc +++ b/compiler/cpp/src/generate/t_rb_generator.cc @@ -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; diff --git a/lib/rb/benchmark/gen-rb/BenchmarkService.rb b/lib/rb/benchmark/gen-rb/BenchmarkService.rb index ff4b10a9..c66f8c0a 100644 --- a/lib/rb/benchmark/gen-rb/BenchmarkService.rb +++ b/lib/rb/benchmark/gen-rb/BenchmarkService.rb @@ -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 diff --git a/lib/rb/spec/gen-rb/NonblockingService.rb b/lib/rb/spec/gen-rb/NonblockingService.rb index ba6b3e48..43273ec6 100644 --- a/lib/rb/spec/gen-rb/NonblockingService.rb +++ b/lib/rb/spec/gen-rb/NonblockingService.rb @@ -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 -- 2.17.1