THRIFT-451. rb: ruby structs use lowercase enum while modules are capitalized
authorBryan Duxbury <bryanduxbury@apache.org>
Mon, 13 Apr 2009 18:12:07 +0000 (18:12 +0000)
committerBryan Duxbury <bryanduxbury@apache.org>
Mon, 13 Apr 2009 18:12:07 +0000 (18:12 +0000)
This patch updates the full_type_name call so it capitalizes a type before it's appended to the module prefix.

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

compiler/cpp/src/generate/t_rb_generator.cc

index 6dcbb5c..708cd42 100644 (file)
@@ -989,7 +989,7 @@ string t_rb_generator::type_name(t_type* ttype) {
   string prefix = "";
 
   string name = ttype->get_name();
-  if (ttype->is_struct() || ttype->is_xception()) {
+  if (ttype->is_struct() || ttype->is_xception() || ttype->is_enum()) {
     name = capitalize(ttype->get_name());
   }