[October 2012] mruby news

written by Daniel Bovensiepen on 2012-11-16 11:25 UTC

Due to work and my preparation for RubyWorld Conference I couldn’t keep up the last couple of weeks. Here now a first update of what happened on the mruby front in October 2012.

Avoid memcpy()

Masaki Muranaka has cleanup the code a bit by avoiding memcpy at quite a few locations.

d5c4439013084ea5dcd30fd44a3a3d045e2dce67, 2cb183f1831d7949130ab8ecbca0630a08a1ba60, 93b56e70ee26428e2f56dd82d3318622628aa62d, e8abf03ae59b72bbc9c3af26eee33a9f4d17cc56, 170d5e7181cef90daa63c39b16ea66f6bd2b17b4

mrbc improvement

mrbc now takes input from STDIN.


Singleton improvement

A singleton classes is now able to have instance variables.


Division by 0

A division by 0 is now not crashing anymore but returns [Inf,NaN]. This is potentially incompatible to CRuby.


Fix Kernel#block_given?

Fix bug in Kernel#block_given? which always returned false.


Enumerable improvement

Enumerable#inject handles now empty enumerables.

fd949663d2229419a1e53e69351205cd27157653, 17278e8ca69d79f4d37e65830c95cc6004c2d8f5

rescue fix

return and break had a bug in a rescue clause.

2f5f853111dd5d73cb7a85c5306aa1e41d3d7fc4, 400a9d81019d987704c5890872d2599a3c60114c, da637cac4a3520f7d6d9a69b392be4309f36ef5b


Unexpected usage of break/next/redo/retry should raise a LocalJumpError exception.


raise C-API change

A new C-function with the name mrb_raisef() was introduced by Masaki Muranaka. It is basically the same as mrb_raise() but without being able to treat variable arguments.



Tomoyuki Sahara implemented a backtrace function.


Fix (get|set) const variable for Singleton

Get and Set for const variables wasn’t working for singleton classes.


available also via rss