From: Bryan Duxbury Date: Tue, 3 Feb 2009 00:31:55 +0000 (+0000) Subject: THRIFT-298. ruby: Exception propagation seems broken for Ruby clients X-Git-Tag: 0.2.0~333 X-Git-Url: https://source.supwisdom.com/gerrit/gitweb?a=commitdiff_plain;h=dc9092ab1a2953c282b1add4a2500467eb9e3c9d;p=common%2Fthrift.git THRIFT-298. ruby: Exception propagation seems broken for Ruby clients This patch fixes the problem. How is anyone's guess, but we'll simplify all this code in the future. git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@740161 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/lib/rb/lib/thrift/struct.rb b/lib/rb/lib/thrift/struct.rb index 8b6c0be7..abed860e 100644 --- a/lib/rb/lib/thrift/struct.rb +++ b/lib/rb/lib/thrift/struct.rb @@ -173,7 +173,7 @@ module Thrift # this will set our field default values method(:struct_initialize).call() # now give it to the exception - self.class.send(:class_variable_get, :'@@__thrift_struct_real_initialize').bind(self).call(*args, &block) + self.class.send(:class_variable_get, :'@@__thrift_struct_real_initialize').bind(self).call(*args, &block) if args.size > 0 # self.class.instance_method(:initialize).bind(self).call(*args, &block) end end