Project

General

Profile

« Previous | Next » 

Revision a21ac07f

Added by Eregon (Benoit Daloze) almost 10 years ago

  • numeric.c (do_coerce): Add a warning when an exception is raised
    or an invalid value is returned in #coerce called by
    numeric comparison operators and the exception
    thrown by the caller has no information on the failure.
    In the next release such exception should not be rescued or
    should be the cause of the caller exception. nil is accepted
    as the "no possible coercion" return value. See #7688.
  • test/ruby/test_numeric.rb: Add corresponding test.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46375 b2dd03c8-39d4-4d8f-98ff-823fe69b080e