Skip to content
Akira Kuroda edited this page Mar 22, 2014 · 4 revisions

I can't override String#+

> 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.

I can't alias for global variables.

> 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.

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 and mruby/pull#1907 .