You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by jf...@apache.org on 2012/02/09 17:17:50 UTC

svn commit: r1242376 - /thrift/trunk/compiler/cpp/src/generate/t_rb_generator.cc

Author: jfarrell
Date: Thu Feb  9 16:17:50 2012
New Revision: 1242376

URL: http://svn.apache.org/viewvc?rev=1242376&view=rev
Log:
Thrift-556:Ruby compiler does not correctly referred to top-level modules when a submodule masks the top-level name
Client: rb
Patch: Ben Kelly

Prepends a :: to every  place that references the top-level module.


Modified:
    thrift/trunk/compiler/cpp/src/generate/t_rb_generator.cc

Modified: thrift/trunk/compiler/cpp/src/generate/t_rb_generator.cc
URL: http://svn.apache.org/viewvc/thrift/trunk/compiler/cpp/src/generate/t_rb_generator.cc?rev=1242376&r1=1242375&r2=1242376&view=diff
==============================================================================
--- thrift/trunk/compiler/cpp/src/generate/t_rb_generator.cc (original)
+++ thrift/trunk/compiler/cpp/src/generate/t_rb_generator.cc Thu Feb  9 16:17:50 2012
@@ -1070,7 +1070,7 @@ string t_rb_generator::type_name(t_type*
 }
 
 string t_rb_generator::full_type_name(t_type* ttype) {
-  string prefix = "";
+  string prefix = "::";
   vector<std::string> modules = ruby_modules(ttype->get_program());
   for (vector<std::string>::iterator m_iter = modules.begin();
        m_iter != modules.end(); ++m_iter) {