mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
add explanation for divizion by zero behavior
+13
-1
@@ -21,4 +21,16 @@ line 1: syntax error, unexpected tGVAR
|
||||
Aliasing global variables using alias statement is out of ISO scope.
|
||||
it's mruby limitation.
|
||||
|
||||
See also [mruby/issues#1154](https://github.com/mruby/mruby/issues/1154).
|
||||
See also [mruby/issues#1154](https://github.com/mruby/mruby/issues/1154).
|
||||
|
||||
## Division by zero does not raise error.
|
||||
```
|
||||
> 1 / 0
|
||||
=> inf
|
||||
> 1 % 0
|
||||
=> NaN
|
||||
> 0 / 0
|
||||
=> NaN
|
||||
```
|
||||
This behavior is an ISO incompatible feature. See
|
||||
[mruby/pull#492](https://github.com/mruby/mruby/pull/492) and [mruby/pull#1907](https://github.com/mruby/mruby/pull/1907) .
|
||||
Reference in New Issue
Block a user