[ruby-cvs:53521] eregon:r46375 (trunk): * numeric.c (do_coerce): Add a warning when an exception is raised

eregon at ruby-lang.org eregon at ruby-lang.org
Sat Jun 7 22:16:03 JST 2014


eregon	2014-06-07 22:16:01 +0900 (Sat, 07 Jun 2014)

  New Revision: 46375

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=46375

  Log:
    * 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.

  Modified files:
    trunk/ChangeLog
    trunk/numeric.c
    trunk/test/ruby/test_numeric.rb


More information about the ruby-cvs mailing list