Tammo Freese
tammo****@tammo*****
Sun Apr 20 20:44:23 JST 2008
Hello all, I found a problem in RubyCocoa regarding a method_missing implementation. It always raises a NameError in error cases. This does not match the behaviour of the default method_missing implementation, which throws a NoMethodError if a method call can safely be assumed: o = Object.new o.foo # NoMethodError class << o; def foo;bar;end;end o.foo # NameError I fixed the method_missing implementation to call super instead of raising a self-defined exception. The code is shorter, and now the method_missing behaves as expected. Thanks for giving us RubyCocoa, Tammo Freese -------------- next part -------------- A non-text attachment was scrubbed... Name: method_missing_patch.diff Type: application/octet-stream Size: 410 bytes Desc: not available Url : http://lists.sourceforge.jp/mailman/archives/rubycocoa-devel/attachments/20080420/fa6d5a66/attachment.obj -------------- next part --------------