rb: Create constants for field ids in generated structs [THRIFT-165]

Author: Bryan Duxbury


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@705330 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/rb/benchmark/gen-rb/BenchmarkService.rb b/lib/rb/benchmark/gen-rb/BenchmarkService.rb
index 42c8aec..7d39882 100644
--- a/lib/rb/benchmark/gen-rb/BenchmarkService.rb
+++ b/lib/rb/benchmark/gen-rb/BenchmarkService.rb
@@ -46,17 +46,21 @@
 
         class Fibonacci_args
           include Thrift::Struct
+          N = 1
+
           Thrift::Struct.field_accessor self, :n
           FIELDS = {
-            1 => {:type => Thrift::Types::BYTE, :name => 'n'}
+            N => {:type => Thrift::Types::BYTE, :name => 'n'}
           }
         end
 
         class Fibonacci_result
           include Thrift::Struct
+          SUCCESS = 0
+
           Thrift::Struct.field_accessor self, :success
           FIELDS = {
-            0 => {:type => Thrift::Types::I32, :name => 'success'}
+            SUCCESS => {:type => Thrift::Types::I32, :name => 'success'}
           }
         end