mruby 2.1.1

We are announcing the stable release of mruby 2.1 series - mruby 2.1.1.


New Features

Core Language Features

Ruby 2.7 features

  • Numbered parameters as default block parameters are introduced. (72d57ad0)

Core Libraries

Ruby 2.7 features

  • Revert Implement Ruby2.7’s frozen strings from Symbol#to_s. (a367373f)

Update Features

Core Language Features

  • Always enable the rational and complex literals. (351c9c80)

Core Libraries

  • The #prepend_features and #module_function methods are not haves for class objects. (cc52fa66)
  • Remove location info from Exception#inspect. (d2f2f9db)
  • Allow true/false argument to Kernel#exit. (mrbgems/mruby-exit) (d81e4d71)
  • Improved the judgment of absolute path on Windows. #4950

Tools

  • Support short options concatenation to mruby command. (9de7130a)
  • Support -- (end of options) to mruby command. (f4b528e0)
  • Quit mruby -v immediately if no program is given for Ruby compatibility. (49653b81)

for mruby Developer

  • Add assertion to RVALUE size. (6cf99d12)

Compatibility

Core Libraries

  • Add File#size and File#truncate. (mrbgems/mruby-io) (6d9ac89f)
  • Add IO#pread and IO#pwrite. (mrbgems/mruby-io) (4c6d524c)
  • Support bit flags for IO.open. (mrbgems/mruby-io) (69619aee)

Changes

Build system

  • Abandon minirake. Use rake for compilation.
    Currently, minirake is left for compatibility, but it will be removed in the future. (de17f63)

Breaking Changes

  • Remove MRB_INT16 configuration option. (ff57c027)

Major bug fixes

  • Parser rejects heredoc without following comma or closing bracket in array/hash literal. #4796
  • Segfault due to invalid read in str_init_shared. #4807
  • Invalid read in array_copy and mrb_ary_unshift_m. #4808
  • Parser segfault (invalid read) in local_add_f. #4810
  • Parser rejects some heredoc in hash literal. #4815
  • Rakefile in mruby build emits warnings with Windows paths. #4817
  • Coredump when use ensure in Kernel#eval script. #4833
  • Fix keyword arguments not be obtained with mrb_get_args(). #4855
  • Undefined method `Pathname’ for MRuby::Toolchain::Android. #4895
  • Cygwin compile error. #4904
  • String#to_f should not allow hexdecimal format. #4924
  • Heap use after free in hash_values_at in mrbgems/mruby-hash-ext/src/hash-ext.c:33. #4926
  • The method name becomes call in backtrace inside a block outside a method. #4936
  • Segmentation fault at mrbgems/mruby-metaprog/src/metaprog.c:142. #4955
  • Test mruby-io in tmpdir when AF_UNIX cannot be created on cwd. #4981
  • IO#readlines/IO#getc hangs while reading over TCPSocket #4982
  • p->locals may be NULL when error occurs before the point. oss-fuzz: Issue 19886
  • Fix buffer overflow in mrb_str_len_to_dbl. oss-fuzz: Issue 19902
  • Fix file/directory name parameter for git command.
  • Fix MRB_FIXNUM_SHIFT with MRB_WORD_BOXING, MRB_INT32 and MRB_64BIT.
  • Build when directories and files have spaces.
  • Fix argument specs of below methods.
    • Exception
      Exception#exception.
    • IO (mrbgems/mruby-io)
      IO._popen, IO.for_fd, IO.select, IO.sysopen, IO.new, IO#sysread and IO#sysseek.
    • File (mrbgems/mruby-io)
      File.umask.
    • Integer
      Integer#ceil, Integer#floor, Integer#round and Integer#truncate.
    • Kernel
      BasicObject#instance_eval, Kernel#integer, Kernel#define_singleton_method, Kernel#send, Kernel#proc, Kernel#sprintf, Kernel#format and Kernel#respond_to?.
    • Hash
      Hash.new and Hash#default.
    • Fiber (mrbgems/mruby-fiber)
      Fiber.new.

We have done 321 commits to 134 files, 4,084 lines were added, 2,742 lines removed since mruby 2.1.0. For more detail of the updates, see Commit Log.

Stay Home and enjoy mruby 2.1.1.