[MacRuby] #1471: '0.0 % 0.0' should not raise exception, but should return NaN.
#1471: '0.0 % 0.0' should not raise exception, but should return NaN. ----------------------------------+----------------------------------------- Reporter: watson1978@… | Owner: lsansonetti@… Type: defect | Status: new Priority: minor | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- {{{ $ ruby19 -e 'p 0.0 % 0.0' NaN $ macruby -e 'p 0.0 % 0.0' -e:1:in `%': divided by 0 (ZeroDivisionError) }}} Test Script: {{{ require 'test/unit/assertions.rb' include Test::Unit::Assertions assert_equal("NaN", (1.0 % 0.0).to_s) assert_raise(ZeroDivisionError){ 1.0.send(:%, 0.0) } assert_raise(ZeroDivisionError){ 1.0 % 0 } assert_raise(ZeroDivisionError){ 1.0.modulo(0.0) } }}} -- Ticket URL: <http://www.macruby.org/trac/ticket/1471> MacRuby <http://macruby.org/>
#1471: '0.0 % 0.0' should not raise exception, but should return NaN. ----------------------------------+----------------------------------------- Reporter: watson1978@… | Owner: lsansonetti@… Type: defect | Status: closed Priority: minor | Milestone: Component: MacRuby | Resolution: fixed Keywords: | ----------------------------------+----------------------------------------- Changes (by watson1978@…): * status: new => closed * resolution: => fixed Comment: Fixed with https://github.com/MacRuby/MacRuby/commit/a3b91c64b6fa2635f3ce51610f3f4ca9c1... -- Ticket URL: <http://www.macruby.org/trac/ticket/1471#comment:1> MacRuby <http://macruby.org/>
participants (1)
-
MacRuby