This articles was published on 2013-11-02

[October 2013] mruby news

What happened on the mruby front in October 2013?

Implementation

The following methods were re-implemented in Ruby and their C implementation was removed:

  • Numeric: +, - and abs
  • Integer: next and succ

Class.new was improved and accepts now a block. And the following stuff was newly implemented:

  • Symbol: length, capitalise, downcase, up case, empty
  • Module: const_missing

Bugfixes

Some work was done to fix a bug which occur when two files are concatenated to each other. A possible overflow of Fixnum#succ was prevented. And an issue with multi-line strings in the mirb is now catched.

Improve Test Coverage

Some regression tests were added for previous bugfixes. This is something we miss quite a lot. Many bugfixes are provided without regression tests, this might lead in the future to the situation that the same bug appears again without us noticing. So lets write more regression tests!

Commits

Here a list with all commits during this month.

Implementation

implement some Numeric methods in Ruby

implement Integer#succ in Ruby

implement Class.new with block

define Module#const_missing

add some methods to Symbol

Bugfixes

fix wrong actual and expected order

fix #1550

fix 3a4c8e2

fix #1544

fix #1542

Fixnum#succ may overflow

fix no multiline strings in mirb

Fix for caller_dir relative gems

fix #1519

type check class/module in mrb_get_args(); close #1477

preserve only arguments on stack; fix #1527

restore context status to RUNNING on automatic yield at the end of the block; fix #1555

Improve Test Coverage

update test code to ensure return value from class statement

add a regression for #1544

Added test for inline arrays longer than 126 elements.

Others

add mrb_ary_modify(mrb,a); you have to ensure mrb_value a to be an array; ref #1554

Uniquify the results of Object#methods

nil/false should not be implicitly converted to integers in mrb_get_args(); close #1529

mrb_Integer() should not convert strings to integers

modify upto/downto for compatibility

move some methods to make floats and integers compatible [mruby special]

move declarations to the beginning of blocks

Set regs to stack on return of const_get calls before use

better error position display

add mrb_gv_remove(); untested

remove unused value for mrb_gv_remove

simplify stack_clear()

Disable implicit integer conversion in mrb_get_args

Improve Grammar of Documentation