Lots of Ruby code generation improvements
Summary: Submitted by Kevin Clark, Ruby guru from Powerset
Reviewed By: mcslee
Test Plan: He updated the tests in trunk/test/rb/
Notes: The code is now officially "ruby-ish" and idiomatic
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665151 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/test/rb/TestClient.rb b/test/rb/TestClient.rb
index fedb818..1adb5c7 100755
--- a/test/rb/TestClient.rb
+++ b/test/rb/TestClient.rb
@@ -9,7 +9,7 @@
s = TSocket.new('localhost', 9090)
p = TBinaryProtocol.new(s)
-c = ThriftTest::Client.new(p)
+c = Thrift::Test::ThriftTest::Client.new(p)
s.open()
@@ -25,10 +25,12 @@
puts c.testMap({1 => 1, 2 => 2, 3 => 3})
puts c.testList([1,2,3,4,5])
puts c.testSet({1 => true, 2 => true, 3 => true})
-
-struct = Xtruct.new({'string_thing' => 'hi!', 'i32_thing' => 4 })
+struct = Thrift::Test::Xtruct.new({'string_thing' => 'hi!', 'i32_thing' => 4 })
puts c.testStruct(struct)
-puts c.testNest(Xtruct2.new({'struct_thing' => struct, 'i32_thing' => 10}))
+puts c.testNest(Thrift::Test::Xtruct2.new({'struct_thing' => struct, 'i32_thing' => 10}))
+insane = Thrift::Test::Insanity.new({'userMap' => { Thrift::Test::Numberz::ONE => 44 }, 'xtructs' => [struct, Thrift::Test::Xtruct.new({'string_thing' => 'hi again', 'i32_thing' => 12})]})
+puts c.testInsanity(insane)
+puts c.testMapMap(4).inspect
s.close()