THRIFT-358. ruby: Change how external thrift files' generated code is required
authorBryan Duxbury <bryanduxbury@apache.org>
Thu, 5 Mar 2009 23:11:37 +0000 (23:11 +0000)
committerBryan Duxbury <bryanduxbury@apache.org>
Thu, 5 Mar 2009 23:11:37 +0000 (23:11 +0000)
Generated code that relies on included thrift files now doesn't assume the path will be the same.

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

compiler/cpp/src/generate/t_rb_generator.cc

index 169b807..9385282 100644 (file)
@@ -222,7 +222,7 @@ string t_rb_generator::render_includes() {
   const vector<t_program*>& includes = program_->get_includes();
   string result = "";
   for (size_t i = 0; i < includes.size(); ++i) {
-    result += "require File.dirname(__FILE__) + '/" + includes[i]->get_name() + "_types'\n";
+    result += "require '" + includes[i]->get_name() + "_types'\n";
   }
   if (includes.size() > 0) {
     result += "\n";