diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2020-08-18 22:12:28 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2020-10-12 16:21:48 +0900 |
| commit | 2a92fb2516251fb0ddfa2d1026930a2c7465e528 (patch) | |
| tree | 99fe336ea04b8aec484cb27baf13ae3c261d26b1 /mrblib | |
| parent | 18e3d39ee23389d9a7955149c09b6de026804ca3 (diff) | |
| download | mruby-2a92fb2516251fb0ddfa2d1026930a2c7465e528.tar.gz mruby-2a92fb2516251fb0ddfa2d1026930a2c7465e528.zip | |
Make division by zero cause `ZeroDivisionError`.
As described in ISO 15.2.30.
Diffstat (limited to 'mrblib')
| -rw-r--r-- | mrblib/10error.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/mrblib/10error.rb b/mrblib/10error.rb index 0d9f38d58..054603514 100644 --- a/mrblib/10error.rb +++ b/mrblib/10error.rb @@ -21,6 +21,10 @@ end class TypeError < StandardError end +# ISO 15.2.30 +class ZeroDivisionError < StandardError +end + # ISO 15.2.31 class NameError < StandardError attr_accessor :name |
