Author: bryanduxbury
Date: Tue Feb 3 00:31:55 2009
New Revision: 740161
URL: http://svn.apache.org/viewvc?rev=740161&view=rev
Log:
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.
Modified:
incubator/thrift/trunk/lib/rb/lib/thrift/struct.rb
Modified: incubator/thrift/trunk/lib/rb/lib/thrift/struct.rb
URL:
http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/rb/lib/thrift/struct.rb?rev=740161&r1=740160&r2=740161&view=diff
==============================================================================
--- incubator/thrift/trunk/lib/rb/lib/thrift/struct.rb (original)
+++ incubator/thrift/trunk/lib/rb/lib/thrift/struct.rb Tue Feb 3 00:31:55 2009
@@ -173,7 +173,7 @@
# 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