Skip to content

Instantly share code, notes, and snippets.

@yzhliu
yzhliu / thrift-0.6.1-osx-10.10.2.patch
Last active August 29, 2015 14:16
Thrift-0.6.1 source patch for OSX 10.9+ (./configure --with-ruby=no CXXFLAGS="-std=c++11")
diff --git a/compiler/cpp/src/generate/t_rb_generator.cc b/compiler/cpp/src/generate/t_rb_generator.cc
index c9db29a..f4029d0 100644
--- a/compiler/cpp/src/generate/t_rb_generator.cc
+++ b/compiler/cpp/src/generate/t_rb_generator.cc
@@ -319,7 +319,11 @@ void t_rb_generator::generate_enum(t_enum* tenum) {
for(c_iter = constants.begin(); c_iter != constants.end(); ++c_iter) {
// Populate the hash
int value = (*c_iter)->get_value();
- first ? first = false : f_types_ << ", ";
+ if (first) {