From: Run Paint Run Run Date: 2009-08-28T02:17:26+09:00 Subject: [ruby-core:25171] [Bug #1648] Rational#div Raises NoMethodError for Invalid Argument Issue #1648 has been updated by Run Paint Run Run. > I believe that the current behavior is correct. It's misleading for a NoMethodError to be raised by a method which exists when called. If the argument it recieves is inappropriate either a TypeError or ArgumentError should be raised. This is in keeping with the stdlib APIs. > The patch precludes ducktyping the argument. In which case #respond_to? can be used instead. Either way the current exception is wrong. :-) ---------------------------------------- http://redmine.ruby-lang.org/issues/show/1648 ---------------------------------------- http://redmine.ruby-lang.org