|
| 1 | +--- |
| 2 | +layout: post |
| 3 | +title: "mruby 3.2.0 released" |
| 4 | +date: 2023-02-24 00:00:00 |
| 5 | +categories: releases |
| 6 | +--- |
| 7 | + |
| 8 | +# mruby 3.2.0 |
| 9 | + |
| 10 | +We are announcing the first stable release of mruby 3.2 series - [mruby 3.2.0](https://github.com/mruby/mruby/releases/tag/3.2.0). |
| 11 | + |
| 12 | +Describes the new features and changes in mruby 3.2. |
| 13 | +The main changes in mruby 3.2 are also described in [doc/mruby3.2.md](https://github.com/mruby/mruby/blob/master/doc/mruby3.2.md). |
| 14 | + |
| 15 | +--- |
| 16 | + |
| 17 | +# The language |
| 18 | + |
| 19 | +- Now `a::B = c` should evaluate `a` then `c`. |
| 20 | +- Anonymous arguments `*`, `**`, `&` can be passed for forwarding. |
| 21 | +- Multi-precision integer is available now via `mruby-bigint` gem. |
| 22 | + |
| 23 | +# mruby VM and bytecode |
| 24 | + |
| 25 | +- `OP_ARYDUP` was renamed to `OP_ARYSPLAT`. The instruction name |
| 26 | + was changed but instruction number and basic behavior have not |
| 27 | + changed (except that `ARYDUP nil` makes `[]`). |
| 28 | + |
| 29 | +# Tools |
| 30 | + |
| 31 | +## `mruby` |
| 32 | + |
| 33 | +- `-b` only specifies the script is the binary. The files loaded by `-r` are not affected by the option. |
| 34 | +- `mruby` now loads complied binary if the suffix is `.mrb`. |
| 35 | + |
| 36 | +## `mrbc` |
| 37 | + |
| 38 | +- Add `--no-optimize` option to disable optimization. |
| 39 | + |
| 40 | +# mrbgems |
| 41 | + |
| 42 | +## mruby-class-ext |
| 43 | + |
| 44 | +- Add `Class#subclasses` method. |
| 45 | +- Add `Module#undefined_instance_methods` method. |
| 46 | + |
| 47 | +## New bundled gems |
| 48 | + |
| 49 | +- mruby-errno from [https://github.com/iij/mruby-errno.git] |
| 50 | +- mruby-set from [https://github.com/yui-knk/mruby-set.git] |
| 51 | +- mruby-dir from [https://github.com/iij/mruby-dir.git] |
| 52 | +- mruby-data |
| 53 | + |
| 54 | +# Breaking Changes |
| 55 | + |
| 56 | +## `mrb_vm_run()` may detach top-level local variables referenced from blocks |
| 57 | + |
| 58 | +When the `mrb_vm_run()` function (including `mrb_top_run()`) is called, |
| 59 | +the previous top-level local variables referenced from blocks is detached under either of the following conditions. |
| 60 | + |
| 61 | +- If the `stack_keep` parameter is given as 0. |
| 62 | +- If the number of variables in `irep` to be executed is less than the number of previous top-level local variables. |
| 63 | + |
| 64 | +This change also affects API functions such as `mrb_load_string()` and `mrb_load_file()`. |
| 65 | +The conditions under which the previous top-level local variables referenced from blocks is detached in these functions are as follows: |
| 66 | + |
| 67 | +- If the function has no `mrbc_context` pointer parameter, or the `mrbc_context` pointer parameter is set to `NULL`. |
| 68 | +- If the number of variables held in the `mrbc_context` pointer is less than the number of previous top-level local variables. |
| 69 | + |
| 70 | +Intentional reliance on previous behavior may cause compatibility problems in your application. |
| 71 | + |
| 72 | +# CVEs |
| 73 | + |
| 74 | +Following CVEs are fixed. |
| 75 | + |
| 76 | +- [CVE-2022-0080](https://nvd.nist.gov/vuln/detail/CVE-2022-0080) |
| 77 | +- [CVE-2022-0240](https://nvd.nist.gov/vuln/detail/CVE-2022-0240) |
| 78 | +- [CVE-2022-0326](https://nvd.nist.gov/vuln/detail/CVE-2022-0326) |
| 79 | +- [CVE-2022-0631](https://nvd.nist.gov/vuln/detail/CVE-2022-0631) |
| 80 | +- [CVE-2022-0481](https://nvd.nist.gov/vuln/detail/CVE-2022-0481) |
| 81 | +- [CVE-2022-0525](https://nvd.nist.gov/vuln/detail/CVE-2022-0525) |
| 82 | +- [CVE-2022-0570](https://nvd.nist.gov/vuln/detail/CVE-2022-0570) |
| 83 | +- [CVE-2022-0614](https://nvd.nist.gov/vuln/detail/CVE-2022-0614) |
| 84 | +- [CVE-2022-0623](https://nvd.nist.gov/vuln/detail/CVE-2022-0623) |
| 85 | +- [CVE-2022-0630](https://nvd.nist.gov/vuln/detail/CVE-2022-0630) |
| 86 | +- [CVE-2022-0631](https://nvd.nist.gov/vuln/detail/CVE-2022-0631) |
| 87 | +- [CVE-2022-0632](https://nvd.nist.gov/vuln/detail/CVE-2022-0632) |
| 88 | +- [CVE-2022-0717](https://nvd.nist.gov/vuln/detail/CVE-2022-0717) |
| 89 | +- [CVE-2022-0890](https://nvd.nist.gov/vuln/detail/CVE-2022-0890) |
| 90 | +- [CVE-2022-1106](https://nvd.nist.gov/vuln/detail/CVE-2022-1106) |
| 91 | +- [CVE-2022-1212](https://nvd.nist.gov/vuln/detail/CVE-2022-1212) |
| 92 | +- [CVE-2022-1276](https://nvd.nist.gov/vuln/detail/CVE-2022-1276) |
| 93 | +- [CVE-2022-1286](https://nvd.nist.gov/vuln/detail/CVE-2022-1286) |
| 94 | +- [CVE-2022-1934](https://nvd.nist.gov/vuln/detail/CVE-2022-1934) |
| 95 | + |
| 96 | +--- |
| 97 | + |
| 98 | +We have done 1,243 commits to 270 files with 19,130 additions and 10,192 deletions since mruby 3.1.0. For more detail of the updates, [see Commit Log](https://github.com/mruby/mruby/compare/3.1.0...3.2.0). |
| 99 | + |
| 100 | +Thanks to all the contributors who have worked on bug fixes and improvements in the release of `mruby 3.2.0`. |
0 commit comments