[thrift] fix Ruby codegen: capitalize module name for enums
Summary: all module names must be capitalized in Ruby -- if the enum name from the interface isn't capitalized \
then it's a runtime error, e.g. in fb303_types.rb:
-module fb_status
+module Fb_status
Reviewed By: mcslee
Test Plan: fb303 now works with Ruby binding
Revert: OK
TracCamp Project: Thrift
DiffCamp Revision: 692
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665288 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/compiler/cpp/src/generate/t_rb_generator.cc b/compiler/cpp/src/generate/t_rb_generator.cc
index 2de2ed9..edfad0f 100644
--- a/compiler/cpp/src/generate/t_rb_generator.cc
+++ b/compiler/cpp/src/generate/t_rb_generator.cc
@@ -105,7 +105,7 @@
*/
void t_rb_generator::generate_enum(t_enum* tenum) {
indent(f_types_) <<
- "module " << tenum->get_name() << endl;
+ "module " << capitalize(tenum->get_name()) << endl;
indent_up();
vector<t_enum_value*> constants = tenum->get_constants();