Project

General

Profile

Actions

Bug #12158

closed

Fixnum#% doesn't show its name on ZeroDivisionError

Added by naruse (Yui NARUSE) about 8 years ago. Updated about 8 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-freebsd10.2]
[ruby-core:74221]

Description

% ruby -ve'p 12345 % 0'
ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-freebsd10.2]
-e:1:in `<main>': divided by 0 (ZeroDivisionError)

It should behave like

% ruby -ve'p 12345 / 0'
ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-freebsd10.2]
-e:1:in `/': divided by 0 (ZeroDivisionError)
        from -e:1:in `<main>'
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0