Thrift-556:Ruby compiler does not correctly referred to top-level modules when a...
authorJake Farrell <jfarrell@apache.org>
Thu, 9 Feb 2012 16:17:50 +0000 (16:17 +0000)
committerJake Farrell <jfarrell@apache.org>
Thu, 9 Feb 2012 16:17:50 +0000 (16:17 +0000)
Client: rb
Patch: Ben Kelly

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

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

compiler/cpp/src/generate/t_rb_generator.cc

index 8ae4405..95404a0 100644 (file)
@@ -1070,7 +1070,7 @@ string t_rb_generator::type_name(t_type* ttype) {
 }
 
 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) {