forked from mruby/mruby
-
Notifications
You must be signed in to change notification settings - Fork 0
Scripting faq
Akira Kuroda edited this page Mar 22, 2014
·
4 revisions
> class String
* def +(s1)
* end
* end
=> nil
> "a" + "b"
=> "ab"
This causes a error in CRuby's irb, and returns nil
in CRuby.
This behavior is a limitation by the current implementation.
> alias $a $__a__
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.
> 1 / 0
=> inf
> 1 % 0
=> NaN
> 0 / 0
=> NaN
This behavior is an ISO incompatible feature. See mruby/pull#492 and mruby/pull#1907 .