Skip to content
takahashim edited this page Apr 14, 2013 · 3 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.