From: Kenta Murata Date: 2010-03-08T18:24:30+09:00 Subject: [ruby-core:28558] Re: [Bug #2945] Regexp#=== is failed by an exception when the exception is occurred in method_missing Hi, On 2010/03/08, at 17:56, Yukihiro Matsumoto wrote: > |But, I do still not understand Regexp#=== depends on method_missing. > |I expect Regexp#=== with a non-string argument returns false. > |In Regexp#===, if an argument doesn't have to_str method, > |the argument is interpreted as a non-string, isn't it? > > It's a wrong design of method_missing. If one want exceptions from > method_missing ignored for implicit type conversion (to_str, etc.), > it should raise NoMethodError. I understand, I'll use NoMethodError for implicit type conversion methods in method_missing. Thanks. -- Kenta Murata OpenPGP FP = FA26 35D7 4F98 3498 0810 E0D5 F213 966F E9EB 0BCC 本を書きました!! 『Ruby 逆引きレシピ』 http://www.amazon.co.jp/dp/4798119881/mrkn-22 E-mail: mrkn@mrkn.jp twitter: http://twitter.com/mrkn/ blog: http://d.hatena.ne.jp/mrkn/