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 /doc/limitations.md | |
| 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 'doc/limitations.md')
| -rw-r--r-- | doc/limitations.md | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/doc/limitations.md b/doc/limitations.md index 7e58ca420..8ac959b98 100644 --- a/doc/limitations.md +++ b/doc/limitations.md @@ -63,8 +63,15 @@ end #### mruby [2.1.2 (2020-08-06)] -No exception is raised. +No exception is raised. Instead you have to do: +```ruby +begin + 1 / 0 +rescue => e + raise e +end +``` ## Fiber execution can't cross C function boundary mruby's `Fiber` is implemented in a similar way to Lua's co-routine. This |
