From 45ee9cc4048a99d6f3a41dc657b12d44ebe4c70f Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Fri, 3 Mar 2023 15:28:31 +0900 Subject: [PATCH 1/8] mruby-socket/socket.c: read/write should be redefined on Windows; fix #5943 Since normal file descriptors and sockets cannot be mixed on the platform. --- mrbgems/mruby-socket/src/socket.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mrbgems/mruby-socket/src/socket.c b/mrbgems/mruby-socket/src/socket.c index a9ce33d2e..a16192ca2 100644 --- a/mrbgems/mruby-socket/src/socket.c +++ b/mrbgems/mruby-socket/src/socket.c @@ -924,6 +924,8 @@ mrb_mruby_socket_gem_init(mrb_state* mrb) mrb_define_method(mrb, bsock, "sysread", mrb_win32_basicsocket_sysread, MRB_ARGS_REQ(1)|MRB_ARGS_OPT(1)); mrb_define_method(mrb, bsock, "sysseek", mrb_win32_basicsocket_sysseek, MRB_ARGS_REQ(1)); mrb_define_method(mrb, bsock, "syswrite", mrb_win32_basicsocket_syswrite, MRB_ARGS_REQ(1)); + mrb_define_method(mrb, bsock, "read", mrb_win32_basicsocket_sysread, MRB_ARGS_REQ(1)|MRB_ARGS_OPT(1)); + mrb_define_method(mrb, bsock, "write", mrb_win32_basicsocket_syswrite, MRB_ARGS_REQ(1)); #endif constants = mrb_define_module_under(mrb, sock, "Constants"); From 82e289a64db83e8f665d17ec15cbe178a6bf7ca1 Mon Sep 17 00:00:00 2001 From: mimaki Date: Fri, 29 Dec 2023 16:02:13 +0900 Subject: [PATCH 2/8] Update version to 3.3.0RC. --- README.md | 2 +- include/mruby/version.h | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index ed3d9302e..b2959df24 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ To get mruby, you can download the stable version 3.2.0 from the official mruby GitHub repository or clone the trunk of the mruby source tree with the "git clone" command. You can also install and compile mruby using [ruby-install](https://github.com/postmodern/ruby-install), [ruby-build](https://github.com/rbenv/ruby-build) or [rvm](https://github.com/rvm/rvm). -The stable version 3.2.0 of mruby can be downloaded via the following URL: [https://github.com/mruby/mruby/archive/3.2.0.zip](https://github.com/mruby/mruby/archive/3.2.0.zip) +The release candidate version 3.3.0 of mruby can be downloaded via the following URL: [https://github.com/mruby/mruby/archive/3.3.0-rc.zip](https://github.com/mruby/mruby/archive/3.3.0-rc.zip) The latest development version of mruby can be downloaded via the following URL: [https://github.com/mruby/mruby/zipball/master](https://github.com/mruby/mruby/zipball/master) diff --git a/include/mruby/version.h b/include/mruby/version.h index c2fc83d87..fcdfb14d4 100644 --- a/include/mruby/version.h +++ b/include/mruby/version.h @@ -27,7 +27,7 @@ MRB_BEGIN_DECL /* * The version of Ruby used by mruby. */ -#define MRUBY_RUBY_VERSION "3.2" +#define MRUBY_RUBY_VERSION "3.3" /* * Ruby engine. @@ -42,7 +42,7 @@ MRB_BEGIN_DECL /* * Minor release version number. */ -#define MRUBY_RELEASE_MINOR 2 +#define MRUBY_RELEASE_MINOR 3 /* * Tiny release version number. @@ -57,7 +57,7 @@ MRB_BEGIN_DECL /* * Patch level string. (optional) */ -#define MRUBY_PATCHLEVEL_STR "" +#define MRUBY_PATCHLEVEL_STR "RC" #ifndef MRUBY_PATCHLEVEL_STR # if MRUBY_PATCHLEVEL < 0 @@ -85,12 +85,12 @@ MRB_BEGIN_DECL /* * Release month. */ -#define MRUBY_RELEASE_MONTH 2 +#define MRUBY_RELEASE_MONTH 12 /* * Release day. */ -#define MRUBY_RELEASE_DAY 24 +#define MRUBY_RELEASE_DAY 29 /* * Release date as a string. From d4cd589733e429f2716cf54217584e2747cc4f83 Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Sun, 31 Dec 2023 00:43:02 +0900 Subject: [PATCH 3/8] NEWS: add mruby3.3 changes description --- NEWS | 126 ++++++++++++++++++++++++++++++------------------ doc/mruby3.3.md | 90 ++++++++++++++++++++++++++++++++++ 2 files changed, 168 insertions(+), 48 deletions(-) create mode 100644 doc/mruby3.3.md diff --git a/NEWS b/NEWS index 36f955ebe..a3893089c 100644 --- a/NEWS +++ b/NEWS @@ -1,63 +1,93 @@ NEWS ---- -# User visible changes in `mruby3.2` +# User visible changes in `mruby3.3` from `mruby3.2` # The language -- Now `a::B = c` should evaluate `a` then `c`. -- Anonymous arguments `*`, `**`, `&` can be passed for forwarding. -- Multi-precision integer is available now via `mruby-bigint` gem. +- aliases work properly with `super` +- `callee` method work differently with aliases in mruby +- define `Kernel#respond_to_missing?` method +- `_inspect` method (`inspect` with recursive check) is removed +- `__printstr` method is removed; use `print` instead + +# Configuration + +- mruby can be built using Docker now. Try `docker-compose build` for example. +- New Platform: Nintendo Wii +- Improved Platforms: Android, Dreamcast + +# mruby memory API + +- `mrb_default_allocf` can be overridden by the application +- `mrb_open_allocf` will be deprecated # mruby VM and bytecode -- `OP_ARYDUP` was renamed to `OP_ARYSPLAT`. The instruction name - was changed but instruction number and basic behavior have not - changed (except that `ARYDUP nil` makes `[]`). +- [#5870](https://github.com/mruby/mruby/issues/5870) Use OP_LOADINEG instead of OP_LOADI -# Tools +# Changes in mrbgems -## `mruby` +- mruby-bin-config: new options --cxx,--cxxflags,--as,--asflags,--objc,--objcflags +- mruby-binding-eval (merged with mruby-eval) #5989 +- mruby-binding: renamed from mruby-binding-core +- mruby-enumerator: remove internal attribute methods obj, args, kwd, meth, fib. +- mruby-fiber: Add a new mrb_fiber_new() with MRB_API +- mruby-fiber: Allows calling `Fiber#resume` from C +- mruby-fiber: `Fiber#to_s` format changed +- mruby-io: Add "x" mode option for IO.open +- mruby-method: `Method#to_s` format changed +- mruby-pack: support new directives j,J,b,B +- mruby-range-ext: new method `Range#overlap?` +- mruby-string-ext: Add `String#valid_encoding?` method -- `-b` only specifies the script is the binary. The files loaded by `-r` are not affected by the option. -- `mruby` now loads complied binary if the suffix is `.mrb`. +# Bugs Fixed -## `mrbc` +- [#5712](https://github.com/mruby/mruby/issues/5712) No "make install" +- [#5724](https://github.com/mruby/mruby/issues/5724) Rational#** is missing +- [#5725](https://github.com/mruby/mruby/issues/5725) weird const_missing exceptions in mrblib code +- [#5789](https://github.com/mruby/mruby/issues/5789) No memory release of backtrace information due to stack error +- [#5943](https://github.com/mruby/mruby/issues/5943) TCPSocket#write is failed +- [#5944](https://github.com/mruby/mruby/issues/5944) Behavior of calling method with a hash variable +- [#5949](https://github.com/mruby/mruby/issues/5949) Caller appears to report wrong line when block passed and brackets omitted +- [#5974](https://github.com/mruby/mruby/issues/5974) Invalid escape sequences in gem_init.c on windows +- [#5975](https://github.com/mruby/mruby/issues/5975) Equals comparison fails on extreme ends of 64-bit integers +- [#5985](https://github.com/mruby/mruby/issues/5985) Sign extension with OP_LOADI32 in get_int_operand() +- [#5986](https://github.com/mruby/mruby/issues/5986) Fix bugs in String#bytesplice +- [#5987](https://github.com/mruby/mruby/issues/5987) ~(-1 << 64) is incorrect +- [#5991](https://github.com/mruby/mruby/issues/5991) 'gets' method not working in mruby-3.2.0 +- [#5995](https://github.com/mruby/mruby/issues/5995) One seemingly unnecessary parameter is passed in the block parameters +- [#6029](https://github.com/mruby/mruby/issues/6029) mruby build fails under mrbgems directory +- [#6041](https://github.com/mruby/mruby/issues/6041) GC Performance may have degraded +- [#6051](https://github.com/mruby/mruby/issues/6051) Null pointer dereference in mrb_addrinfo_unix_path +- [#6052](https://github.com/mruby/mruby/issues/6052) Null pointer dereference while handling the Proc class +- [#6065](https://github.com/mruby/mruby/issues/6065) Null pointer dereference while handling the Proc class +- [#6066](https://github.com/mruby/mruby/issues/6066) Null pointer dereference involving Struct.new() +- [#6067](https://github.com/mruby/mruby/issues/6067) Null pointer dereference in mrb_string_value_cstr +- [#6068](https://github.com/mruby/mruby/issues/6068) Stack overflow in mrb_vm_exec +- [#6087](https://github.com/mruby/mruby/issues/6087) 'Remote branch HEAD not found in upstream origin' error on build +- [#6089](https://github.com/mruby/mruby/issues/6089) binding.eval() handles def expressions differently from CRuby +- [#6098](https://github.com/mruby/mruby/issues/6098) Fails to call superclass of wrapped method +- [#6108](https://github.com/mruby/mruby/issues/6108) VM crashes with break +- [#6134](https://github.com/mruby/mruby/issues/6134) String#unpack1 returns an array instead of a single string -- Add `--no-optimize` option to disable optimization. +# Pull Requests (User Visible Ones) -# mrbgems - -## mruby-class-ext - -- Add `Class#subclasses` method. -- Add `Module#undefined_instance_methods` method. - -## New bundled gems - -- mruby-errno from [https://github.com/iij/mruby-errno.git] -- mruby-set from [https://github.com/yui-knk/mruby-set.git] -- mruby-dir from [https://github.com/iij/mruby-dir.git] - -# CVEs - -Following CVEs are fixed. - -- [CVE-2022-0080](https://nvd.nist.gov/vuln/detail/CVE-2022-0080) -- [CVE-2022-0240](https://nvd.nist.gov/vuln/detail/CVE-2022-0240) -- [CVE-2022-0326](https://nvd.nist.gov/vuln/detail/CVE-2022-0326) -- [CVE-2022-0481](https://nvd.nist.gov/vuln/detail/CVE-2022-0481) -- [CVE-2022-0525](https://nvd.nist.gov/vuln/detail/CVE-2022-0525) -- [CVE-2022-0570](https://nvd.nist.gov/vuln/detail/CVE-2022-0570) -- [CVE-2022-0614](https://nvd.nist.gov/vuln/detail/CVE-2022-0614) -- [CVE-2022-0623](https://nvd.nist.gov/vuln/detail/CVE-2022-0623) -- [CVE-2022-0630](https://nvd.nist.gov/vuln/detail/CVE-2022-0630) -- [CVE-2022-0631](https://nvd.nist.gov/vuln/detail/CVE-2022-0631) -- [CVE-2022-0632](https://nvd.nist.gov/vuln/detail/CVE-2022-0632) -- [CVE-2022-0717](https://nvd.nist.gov/vuln/detail/CVE-2022-0717) -- [CVE-2022-0890](https://nvd.nist.gov/vuln/detail/CVE-2022-0890) -- [CVE-2022-1106](https://nvd.nist.gov/vuln/detail/CVE-2022-1106) -- [CVE-2022-1212](https://nvd.nist.gov/vuln/detail/CVE-2022-1212) -- [CVE-2022-1276](https://nvd.nist.gov/vuln/detail/CVE-2022-1276) -- [CVE-2022-1286](https://nvd.nist.gov/vuln/detail/CVE-2022-1286) -- [CVE-2022-1934](https://nvd.nist.gov/vuln/detail/CVE-2022-1934) +- [#5870](https://github.com/mruby/mruby/pull/5870) Use OP_LOADINEG instead of OP_LOADI +- [#5966](https://github.com/mruby/mruby/pull/5966) Update default.gembox add mruby debugger mrdb +- [#5979](https://github.com/mruby/mruby/pull/5979) Allow Class#allocate to be prohibited +- [#5989](https://github.com/mruby/mruby/pull/5989) Integrate mruby-binding-eval into mruby-eval +- [#5961](https://github.com/mruby/mruby/pull/5961) Add Docker to build and run all mruby tests. Run pre-commit and generate YARD docs with Docker +- [#6008](https://github.com/mruby/mruby/pull/6008) Make "bintest" independent of directory +- [#6009](https://github.com/mruby/mruby/pull/6009) Avoid adding /bintest which does not exist +- [#6012](https://github.com/mruby/mruby/pull/6012) Allow tests to be disabled for specific gems; warn about disabled tests +- [#6013](https://github.com/mruby/mruby/pull/6013) Fix Android toolchain +- [#6032](https://github.com/mruby/mruby/pull/6032) Rake: update task clean to remove bin and build folders +- [#6045](https://github.com/mruby/mruby/pull/6045) Fixes escape sequence bug and enhancements in Presym scanning +- [#6076](https://github.com/mruby/mruby/pull/6076) Fixed unwinding block that could point to invalid PC +- [#6081](https://github.com/mruby/mruby/pull/6081) Add "x" mode option for IO.open +- [#6086](https://github.com/mruby/mruby/pull/6086) Add build config for Nintendo Wii +- [#6097](https://github.com/mruby/mruby/pull/6097) Add a new mrb_fiber_new() with MRB_API +- [#6106](https://github.com/mruby/mruby/pull/6106) Ease fiber limitations +- [#6118](https://github.com/mruby/mruby/pull/6118) Fixed IO#read with buf +- [#6120](https://github.com/mruby/mruby/pull/6120) Set EBADF if check_file_descriptor() fails diff --git a/doc/mruby3.3.md b/doc/mruby3.3.md new file mode 100644 index 000000000..5fc5ca4eb --- /dev/null +++ b/doc/mruby3.3.md @@ -0,0 +1,90 @@ +# User visible changes in `mruby3.3` from `mruby3.2` + +# The language + +- aliases work properly with `super` +- `callee` method work differently with aliases in mruby +- define `Kernel#respond_to_missing?` method +- `_inspect` method (`inspect` with recursive check) is removed +- `__printstr` method is removed; use `print` instead + +# Configuration + +- mruby can be built using Docker now. Try `docker-compose build` for example. +- New Platform: Nintendo Wii +- Improved Platforms: Android, Dreamcast + +# mruby memory API + +- `mrb_default_allocf` can be overridden by the application +- `mrb_open_allocf` will be deprecated + +# mruby VM and bytecode + +- [#5870](https://github.com/mruby/mruby/issues/5870) Use OP_LOADINEG instead of OP_LOADI + +# Changes in mrbgems + +- mruby-bin-config: new options --cxx,--cxxflags,--as,--asflags,--objc,--objcflags +- mruby-binding-eval (merged with mruby-eval) #5989 +- mruby-binding: renamed from mruby-binding-core +- mruby-enumerator: remove internal attribute methods obj, args, kwd, meth, fib. +- mruby-fiber: Add a new mrb_fiber_new() with MRB_API +- mruby-fiber: Allows calling `Fiber#resume` from C +- mruby-fiber: `Fiber#to_s` format changed +- mruby-io: Add "x" mode option for IO.open +- mruby-method: `Method#to_s` format changed +- mruby-pack: support new directives j,J,b,B +- mruby-range-ext: new method `Range#overlap?` +- mruby-string-ext: Add `String#valid_encoding?` method + +# Bugs Fixed + +- [#5712](https://github.com/mruby/mruby/issues/5712) No "make install" +- [#5724](https://github.com/mruby/mruby/issues/5724) Rational#\*\* is missing +- [#5725](https://github.com/mruby/mruby/issues/5725) weird const_missing exceptions in mrblib code +- [#5789](https://github.com/mruby/mruby/issues/5789) No memory release of backtrace information due to stack error +- [#5943](https://github.com/mruby/mruby/issues/5943) TCPSocket#write is failed +- [#5944](https://github.com/mruby/mruby/issues/5944) Behavior of calling method with a hash variable +- [#5949](https://github.com/mruby/mruby/issues/5949) Caller appears to report wrong line when block passed and brackets omitted +- [#5974](https://github.com/mruby/mruby/issues/5974) Invalid escape sequences in gem_init.c on windows +- [#5975](https://github.com/mruby/mruby/issues/5975) Equals comparison fails on extreme ends of 64-bit integers +- [#5985](https://github.com/mruby/mruby/issues/5985) Sign extension with OP_LOADI32 in get_int_operand() +- [#5986](https://github.com/mruby/mruby/issues/5986) Fix bugs in String#bytesplice +- [#5987](https://github.com/mruby/mruby/issues/5987) ~(-1 << 64) is incorrect +- [#5991](https://github.com/mruby/mruby/issues/5991) 'gets' method not working in mruby-3.2.0 +- [#5995](https://github.com/mruby/mruby/issues/5995) One seemingly unnecessary parameter is passed in the block parameters +- [#6029](https://github.com/mruby/mruby/issues/6029) mruby build fails under mrbgems directory +- [#6041](https://github.com/mruby/mruby/issues/6041) GC Performance may have degraded +- [#6051](https://github.com/mruby/mruby/issues/6051) Null pointer dereference in mrb_addrinfo_unix_path +- [#6052](https://github.com/mruby/mruby/issues/6052) Null pointer dereference while handling the Proc class +- [#6065](https://github.com/mruby/mruby/issues/6065) Null pointer dereference while handling the Proc class +- [#6066](https://github.com/mruby/mruby/issues/6066) Null pointer dereference involving Struct.new() +- [#6067](https://github.com/mruby/mruby/issues/6067) Null pointer dereference in mrb_string_value_cstr +- [#6068](https://github.com/mruby/mruby/issues/6068) Stack overflow in mrb_vm_exec +- [#6087](https://github.com/mruby/mruby/issues/6087) 'Remote branch HEAD not found in upstream origin' error on build +- [#6089](https://github.com/mruby/mruby/issues/6089) binding.eval() handles def expressions differently from CRuby +- [#6098](https://github.com/mruby/mruby/issues/6098) Fails to call superclass of wrapped method +- [#6108](https://github.com/mruby/mruby/issues/6108) VM crashes with break +- [#6134](https://github.com/mruby/mruby/issues/6134) String#unpack1 returns an array instead of a single string + +# Pull Requests (User Visible Ones) + +- [#5870](https://github.com/mruby/mruby/pull/5870) Use OP_LOADINEG instead of OP_LOADI +- [#5966](https://github.com/mruby/mruby/pull/5966) Update default.gembox add mruby debugger mrdb +- [#5979](https://github.com/mruby/mruby/pull/5979) Allow Class#allocate to be prohibited +- [#5989](https://github.com/mruby/mruby/pull/5989) Integrate mruby-binding-eval into mruby-eval +- [#5961](https://github.com/mruby/mruby/pull/5961) Add Docker to build and run all mruby tests. Run pre-commit and generate YARD docs with Docker +- [#6008](https://github.com/mruby/mruby/pull/6008) Make "bintest" independent of directory +- [#6009](https://github.com/mruby/mruby/pull/6009) Avoid adding /bintest which does not exist +- [#6012](https://github.com/mruby/mruby/pull/6012) Allow tests to be disabled for specific gems; warn about disabled tests +- [#6013](https://github.com/mruby/mruby/pull/6013) Fix Android toolchain +- [#6032](https://github.com/mruby/mruby/pull/6032) Rake: update task clean to remove bin and build folders +- [#6045](https://github.com/mruby/mruby/pull/6045) Fixes escape sequence bug and enhancements in Presym scanning +- [#6076](https://github.com/mruby/mruby/pull/6076) Fixed unwinding block that could point to invalid PC +- [#6081](https://github.com/mruby/mruby/pull/6081) Add "x" mode option for IO.open +- [#6086](https://github.com/mruby/mruby/pull/6086) Add build config for Nintendo Wii +- [#6097](https://github.com/mruby/mruby/pull/6097) Add a new mrb_fiber_new() with MRB_API +- [#6106](https://github.com/mruby/mruby/pull/6106) Ease fiber limitations +- [#6118](https://github.com/mruby/mruby/pull/6118) Fixed IO#read with buf +- [#6120](https://github.com/mruby/mruby/pull/6120) Set EBADF if check_file_descriptor() fails From f8511ecb22e850bcf0a81424f9cabdd74688c035 Mon Sep 17 00:00:00 2001 From: John Bampton Date: Sun, 31 Dec 2023 21:57:58 +1000 Subject: [PATCH 4/8] Fix `pre-commit` failure from `prettier` --- .github/linters/.yaml-lint.yml | 2 ++ .github/workflows/oss-fuzz.yml | 4 ++-- .github/workflows/super-linter.yml | 4 ++-- .gitignore | 1 + .pre-commit-config.yaml | 1 + .prettierrc | 3 +++ SECURITY.md | 2 +- build_config/dreamcast_shelf.rb | 2 +- doc/guides/compile.md | 4 ++-- doc/guides/debugger.md | 4 ++-- doc/guides/gc-arena-howto.md | 2 +- doc/guides/link.md | 12 ++++++------ doc/guides/mrbconf.md | 8 ++++---- doc/guides/mrbgems.md | 6 +++--- doc/guides/symbol.md | 14 +++++++------- doc/internal/boxing.md | 4 ++-- doc/mruby3.0.md | 9 +++++---- docker-compose.yml | 2 +- mrbgems/mruby-bigint/README-fgmp.md | 16 ++++++++-------- mrbgems/mruby-io/README.md | 4 ++-- mrbgems/mruby-pack/README.md | 2 +- 21 files changed, 57 insertions(+), 49 deletions(-) create mode 100644 .prettierrc diff --git a/.github/linters/.yaml-lint.yml b/.github/linters/.yaml-lint.yml index be4c88798..f5e0ee462 100644 --- a/.github/linters/.yaml-lint.yml +++ b/.github/linters/.yaml-lint.yml @@ -4,6 +4,8 @@ extends: default rules: + comments: + min-spaces-from-content: 1 document-start: disable line-length: disable truthy: false diff --git a/.github/workflows/oss-fuzz.yml b/.github/workflows/oss-fuzz.yml index ce5023a67..c4e0b3d10 100644 --- a/.github/workflows/oss-fuzz.yml +++ b/.github/workflows/oss-fuzz.yml @@ -11,12 +11,12 @@ jobs: - name: Build Fuzzers uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master with: - oss-fuzz-project-name: 'mruby' + oss-fuzz-project-name: "mruby" dry-run: false - name: Run Fuzzers uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master with: - oss-fuzz-project-name: 'mruby' + oss-fuzz-project-name: "mruby" fuzz-seconds: 600 dry-run: false - name: Upload Crash diff --git a/.github/workflows/super-linter.yml b/.github/workflows/super-linter.yml index 8d817ef4d..d250a7f98 100644 --- a/.github/workflows/super-linter.yml +++ b/.github/workflows/super-linter.yml @@ -9,8 +9,8 @@ permissions: jobs: build: permissions: - contents: read # for actions/checkout to fetch code - statuses: write # for github/super-linter/slim to mark status of each linter run + contents: read # for actions/checkout to fetch code + statuses: write # for github/super-linter/slim to mark status of each linter run name: Lint Code Base runs-on: ubuntu-latest steps: diff --git a/.gitignore b/.gitignore index eb5b5ddfa..e604347b9 100644 --- a/.gitignore +++ b/.gitignore @@ -31,5 +31,6 @@ compile_commands.json compile_flags.txt cscope.files cscope.out +node_modules tags !Gemfile.lock diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e66cc3b3d..d344920fd 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -54,6 +54,7 @@ repos: rev: v4.0.0-alpha.8 hooks: - id: prettier + exclude: ^doc/internal/opcode\.md$ - repo: https://github.com/igorshubovych/markdownlint-cli rev: v0.38.0 hooks: diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 000000000..81b81d20d --- /dev/null +++ b/.prettierrc @@ -0,0 +1,3 @@ +{ + "bracketSpacing": false +} diff --git a/SECURITY.md b/SECURITY.md index 779b06c32..bd80d2dd9 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -11,7 +11,7 @@ We consider the following issues as vulnerabilities: - Remote code execution - Crash caused by a valid Ruby script -We *don't* consider the following issues as vulnerabilities: +We _don't_ consider the following issues as vulnerabilities: - Runtime C undefined behavior (including integer overflow) - Crash caused by misused API diff --git a/build_config/dreamcast_shelf.rb b/build_config/dreamcast_shelf.rb index 7a4cc1afc..0edd9470c 100644 --- a/build_config/dreamcast_shelf.rb +++ b/build_config/dreamcast_shelf.rb @@ -34,7 +34,7 @@ MRuby::CrossBuild.new("dreamcast") do |conf| cc.defines << %w(_arch_sub_pristine) end - # C++ compiler + # C++ compiler conf.cxx do |cxx| cxx.command = conf.cc.command.dup cxx.include_paths = conf.cc.include_paths.dup diff --git a/doc/guides/compile.md b/doc/guides/compile.md index 579a49d7a..dab175613 100644 --- a/doc/guides/compile.md +++ b/doc/guides/compile.md @@ -80,7 +80,7 @@ conf.toolchain :clang #### Visual Studio 2010, 2012 and 2013 Toolchain configuration for Visual Studio on Windows. If you use the -[Visual Studio Command Prompt](https://msdn.microsoft.com/en-us/library/ms229859\(v=vs.110\).aspx), +[Visual Studio Command Prompt](), you normally do not have to specify this manually, since it gets automatically detected by our build process. ```ruby @@ -460,7 +460,7 @@ compile for `i386` a directory called `i386` is created under the build directory. The cross compilation workflow starts in the same way as the normal -compilation by compiling all *native* libraries and binaries, except +compilation by compiling all _native_ libraries and binaries, except for we don't have `host/mrbc` directory (`host` directory itself works as placeholder for `mrbc`). Afterwards the cross compilation process proceeds like this: diff --git a/doc/guides/debugger.md b/doc/guides/debugger.md index 60be1cc8f..dba9fb57d 100644 --- a/doc/guides/debugger.md +++ b/doc/guides/debugger.md @@ -62,7 +62,7 @@ $ mrdb sample.rb You can execute the shell commands listed below: | command | description | -|:----------------:|:--------------------------------------------------------------------------| +| :--------------: | :------------------------------------------------------------------------ | | run | execute programs | | step | execute stepping | | continue | execute continuing program | @@ -83,7 +83,7 @@ You can debug the mruby binary files. #### 2.2.2.1 Debugging the binary files - notice -To debug mruby binary files, you need to compile mruby files with option `-g`. + To debug mruby binary files, you need to compile mruby files with option `-g`. ```bash $ mrbc -g sample.rb diff --git a/doc/guides/gc-arena-howto.md b/doc/guides/gc-arena-howto.md index 31bee93f1..2ac2bdfd4 100644 --- a/doc/guides/gc-arena-howto.md +++ b/doc/guides/gc-arena-howto.md @@ -4,7 +4,7 @@ _This is an English translation of [Matz's blog post][matz blog post] written in Japanese._ _Some parts are updated to reflect recent changes._ -[matz blog post]: +[matz blog post]: https://www.rubyist.net/~matz/20130731.html When you are extending mruby using C language, you may encounter mysterious "arena overflow error" or memory leak or very slow diff --git a/doc/guides/link.md b/doc/guides/link.md index 491efc413..ac19aa234 100644 --- a/doc/guides/link.md +++ b/doc/guides/link.md @@ -51,8 +51,8 @@ for example: To retrieve compiler options used to build `mruby`, you can use `mruby-config` command with following options: -- `--cc` compiler name -- `--cflags` options passed to compiler +- `--cc` compiler name +- `--cflags` options passed to compiler ```console $ mruby-config --cflags @@ -66,10 +66,10 @@ compatible to mruby configuration. To retrieve linker options, you can use `mruby-config` with following options: -- `--ld` linker name -- `--ldflags` options passed to linker -- `--ldflags-before-libs` options passed to linker before linked libraries -- `--libs` linked libraries +- `--ld` linker name +- `--ldflags` options passed to linker +- `--ldflags-before-libs` options passed to linker before linked libraries +- `--libs` linked libraries ```console $ mruby-config --ldflags diff --git a/doc/guides/mrbconf.md b/doc/guides/mrbconf.md index dc1538506..823a0ba17 100644 --- a/doc/guides/mrbconf.md +++ b/doc/guides/mrbconf.md @@ -25,7 +25,7 @@ MRuby::Build.new do |conf| end ``` -***NOTE*** +**_NOTE_** - Use common definitions (`conf.defines`) instead of per-compiler definitions (e.g., `conf.cc.defines`) unless there is a special reason not to. - It is now deprecated to edit the `include/mruby/mrbconf.h` file or give it directly as a compiler flag, as was the case before. @@ -123,7 +123,7 @@ end - Defines value is `1024`. - Specifies number of `RBasic` per each heap page. -- To calculate the number of bytes per heap page, it is "(size of management data per heap page) + (size per object) * `MRB_HEAP_PAGE_SIZE`". +- To calculate the number of bytes per heap page, it is "(size of management data per heap page) + (size per object) \* `MRB_HEAP_PAGE_SIZE`". In mruby 3.1.0, the "size of management data per heap page" is 6 words, also "size per object" is 6 words. For a 32-bit CPU, `(6 * 4) + (6 * 4) * MRB_HEAP_PAGE_SIZE` gives the bytes of size per heap page. Conversely, for example, to keep the size per heap page to 4 Ki bytes, @@ -135,7 +135,7 @@ end - Default value is `4`. - If you're allocating data types that requires alignment more than default value define the -largest value of required alignment. + largest value of required alignment. `POOL_PAGE_SIZE` @@ -149,7 +149,7 @@ largest value of required alignment. - If defined enables fixed size `mrb_state` atexit stack. - Raises `RuntimeError` when `mrb_state_atexit` call count to same `mrb_state` exceeds -`MRB_FIXED_STATE_ATEXIT_STACK_SIZE`'s value. + `MRB_FIXED_STATE_ATEXIT_STACK_SIZE`'s value. `MRB_FIXED_STATE_ATEXIT_STACK_SIZE` diff --git a/doc/guides/mrbgems.md b/doc/guides/mrbgems.md index 999629d4d..fe086c1e9 100644 --- a/doc/guides/mrbgems.md +++ b/doc/guides/mrbgems.md @@ -248,7 +248,7 @@ Version requirement supports following operators: - '<=': is equal or lesser - '~>': is equal or greater and is lesser than the next major version - example 1: '~> 2.2.2' means '>= 2.2.2' and '< 2.3.0' - - example 2: '~> 2.2' means '>= 2.2.0' and '< 3.0.0' + - example 2: '~> 2.2' means '>= 2.2.0' and '< 3.0.0' When more than one version requirements is passed, the dependency must satisfy all of it. @@ -395,8 +395,8 @@ override existing classes or add new ones in this way. Put all Ruby files into the `mrblib` directory and all C files into the `src` directory. mruby codes under `mrblib` directory would be executed after gem init C -function is called. Make sure *mruby script* depends on *C code* and -*C code* doesn't depend on *mruby script*. +function is called. Make sure _mruby script_ depends on _C code_ and +_C code_ doesn't depend on _mruby script_. ### Pre-Conditions diff --git a/doc/guides/symbol.md b/doc/guides/symbol.md index c76420da9..bae789b64 100644 --- a/doc/guides/symbol.md +++ b/doc/guides/symbol.md @@ -57,13 +57,13 @@ To save RAM, `mruby` can use compile-time allocation of some symbols. You can use following macros to get preallocated symbols by including `mruby/presym.h` header. -- `MRB_SYM(xor)` //=> xor (Word characters) -- `MRB_SYM_B(xor)` //=> xor! (Method with Bang) -- `MRB_SYM_Q(xor)` //=> xor? (Method with Question mark) -- `MRB_SYM_E(xor)` //=> xor= (Method with Equal) -- `MRB_CVSYM(xor)` //=> @@xor (Class Variable) -- `MRB_IVSYM(xor)` //=> @xor (Instance Variable) -- `MRB_OPSYM(xor)` //=> ^ (Operator) +- `MRB_SYM(xor)` //=> xor (Word characters) +- `MRB_SYM_B(xor)` //=> xor! (Method with Bang) +- `MRB_SYM_Q(xor)` //=> xor? (Method with Question mark) +- `MRB_SYM_E(xor)` //=> xor= (Method with Equal) +- `MRB_CVSYM(xor)` //=> @@xor (Class Variable) +- `MRB_IVSYM(xor)` //=> @xor (Instance Variable) +- `MRB_OPSYM(xor)` //=> ^ (Operator) For `MRB_OPSYM()`, specify the names corresponding to operators (see `MRuby::Presym::OPERATORS` in `lib/mruby/presym.rb` for the names that diff --git a/doc/internal/boxing.md b/doc/internal/boxing.md index eb03de74b..0cae591e6 100644 --- a/doc/internal/boxing.md +++ b/doc/internal/boxing.md @@ -15,7 +15,7 @@ Some values (called immediate values, e.g. integers, booleans, symbols, etc.) ar The Word boxing packing bit patterns are like following: | Types | Bit Pattern | -|--------|---------------------------------------| +| ------ | ------------------------------------- | | object | `xxxxxxxx xxxxxxxx xxxxxxxx xxxxx000` | | fixnum | `xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxx1` | | nil | `00000000 00000000 00000000 00000000` | @@ -34,7 +34,7 @@ NaN boxing packs the Ruby data in a floating-point numbers, which represent NaN The NaN boxing packing bit patterns are like following: | Types | Bit Pattern | -|--------|---------------------------------------------------------------------------| +| ------ | ------------------------------------------------------------------------- | | float | `SEEEEEEE EEEEFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF` | | +/-inf | `S1111111 11110000 00000000 00000000 00000000 00000000 00000000 00000000` | | nan | `01111111 11111000 00000000 00000000 00000000 00000000 00000000 00000000` | diff --git a/doc/mruby3.0.md b/doc/mruby3.0.md index 3f7418c49..9d211abb5 100644 --- a/doc/mruby3.0.md +++ b/doc/mruby3.0.md @@ -42,10 +42,10 @@ We have ported some new syntax from CRuby. ## Renamed for consistency Some configuration macro names are changed for consistency (use `MRB_USE_XXX` - or `MRB_NO_XXX`). +or `MRB_NO_XXX`). -| mruby2 | mruby3 | -|--------------------------------|---------------------------| +| mruby2 | mruby3 | +| ------------------------------ | ------------------------- | | `MRB_ENABLE_ALL_SYMBOLS` | `MRB_USE_ALL_SYMBOLS` | | `MRB_ENABLE_CXX_ABI` | `MRB_USE_CXX_ABI` | | `MRB_ENABLE_CXX_EXCEPTION` | `MRB_USE_CXX_EXCEPTION` | @@ -149,7 +149,8 @@ No more operand extension ## Changed Instructions -Jump addresses used to be specified by absolute offset from the start of `iseq`. Now they are relative offset from the address of the next instruction. +Jump addresses used to be specified by absolute offset from the start of `iseq`. Now they are relative offset from the +address of the next instruction. ## `Random` now use `xoshiro128++`. diff --git a/docker-compose.yml b/docker-compose.yml index 55b61a874..009947b0f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,4 +1,4 @@ -version: '3.8' +version: "3.8" services: test: build: diff --git a/mrbgems/mruby-bigint/README-fgmp.md b/mrbgems/mruby-bigint/README-fgmp.md index 591188c12..7693f3c1f 100644 --- a/mrbgems/mruby-bigint/README-fgmp.md +++ b/mrbgems/mruby-bigint/README-fgmp.md @@ -73,18 +73,18 @@ MS-DOS 286 C compiler (see credits above) 1. fgmp is considerably slower than gmp 2. fgmp does not implement the following: - all mpq_* - internal mpn_* functions - mpz_perfect_square_p - mpz_inp_raw, mpz_out_raw - mp_set_memory_functions, mpz_out_str, mpz_inp_str + - all mpq\_\* + - internal mpn\_\* functions + - mpz_perfect_square_p + - mpz_inp_raw, mpz_out_raw + - mp_set_memory_functions, mpz_out_str, mpz_inp_str 3. fgmp implements the following in addition to the routines in GNU gmp. - `int mpz_jacobi(MP_INT *a, MP_INT *b)` - - finds the jacobi symbol (a/b) + `int mpz_jacobi(MP_INT *a, MP_INT *b)` + - finds the jacobi symbol (a/b) 4. mpz_sizeinbase often overestimates the exact value 5. To convert your gmp based program to fgmp (subject to the -above) + above) - recompile your source. Make sure to include the gmp.h file included with fgmp rather than that included with gmp. (The point is to recompile diff --git a/mrbgems/mruby-io/README.md b/mrbgems/mruby-io/README.md index 21138ace4..99c48f3d6 100644 --- a/mrbgems/mruby-io/README.md +++ b/mrbgems/mruby-io/README.md @@ -17,7 +17,7 @@ Add the line below to your build configuration. - | method | mruby-io | memo | -|----------------------------|----------|----------| +| -------------------------- | -------- | -------- | | IO.binread | | | | IO.binwrite | | | | IO.copy_stream | | | @@ -102,7 +102,7 @@ Add the line below to your build configuration. - | method | mruby-io | memo | -|-----------------------------|----------|----------| +| --------------------------- | -------- | -------- | | File.absolute_path | | | | File.atime | | | | File.basename | o | | diff --git a/mrbgems/mruby-pack/README.md b/mrbgems/mruby-pack/README.md index 10a538095..d108f2a09 100644 --- a/mrbgems/mruby-pack/README.md +++ b/mrbgems/mruby-pack/README.md @@ -45,7 +45,7 @@ There is no dependency on other mrbgems. - V : 32-bit unsigned, VAX (little-endian) byte order - v : 16-bit unsigned, VAX (little-endian) byte order - x : null byte -- Z : same as "a", except that null is added with * +- Z : same as "a", except that null is added with \* ## License From 69682e3d41113f109567679bf99e27f42e5da4df Mon Sep 17 00:00:00 2001 From: dearblue Date: Sun, 31 Dec 2023 14:18:54 +0900 Subject: [PATCH 5/8] Fixed when combined `mrb_fiber_resume()` and `Fiber#transfer` For example, the following code was crashing. ```c #include #include #include int main(int argc, char *argv[]) { mrb_state *mrb = mrb_open(); mrb_value fiber = mrb_load_string(mrb, "Fiber.new { Fiber.new { 12345.6789 }.transfer }"); mrb_value res = mrb_fiber_resume(mrb, fiber, 0, NULL); mrb_p(mrb, res); mrb_close(mrb); return 0; } ``` --- src/vm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/vm.c b/src/vm.c index 759fd977a..a5c1dee9c 100644 --- a/src/vm.c +++ b/src/vm.c @@ -2399,7 +2399,8 @@ RETRY_TRY_BLOCK: mrb->c = c->prev ? c->prev : mrb->root_c; c->prev = NULL; mrb->c->status = MRB_FIBER_RUNNING; - if (c->vmexec) { + if (c->vmexec || + (mrb->c == mrb->root_c && mrb->c->ci == mrb->c->cibase) /* case using Fiber#transfer in mrb_fiber_resume() */) { mrb_gc_arena_restore(mrb, ai); c->vmexec = FALSE; mrb->jmp = prev_jmp; From 28a1f7d143b7ec0f3c6504f0a65017faf56a6a9a Mon Sep 17 00:00:00 2001 From: mimaki Date: Thu, 4 Jan 2024 14:56:56 +0900 Subject: [PATCH 6/8] Update version to 3.3.0RC2. --- README.md | 2 +- include/mruby/version.h | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index b2959df24..5e3d86c5f 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ To get mruby, you can download the stable version 3.2.0 from the official mruby GitHub repository or clone the trunk of the mruby source tree with the "git clone" command. You can also install and compile mruby using [ruby-install](https://github.com/postmodern/ruby-install), [ruby-build](https://github.com/rbenv/ruby-build) or [rvm](https://github.com/rvm/rvm). -The release candidate version 3.3.0 of mruby can be downloaded via the following URL: [https://github.com/mruby/mruby/archive/3.3.0-rc.zip](https://github.com/mruby/mruby/archive/3.3.0-rc.zip) +The release candidate version 3.3.0 of mruby can be downloaded via the following URL: [https://github.com/mruby/mruby/archive/3.3.0-rc2.zip](https://github.com/mruby/mruby/archive/3.3.0-rc2.zip) The latest development version of mruby can be downloaded via the following URL: [https://github.com/mruby/mruby/zipball/master](https://github.com/mruby/mruby/zipball/master) diff --git a/include/mruby/version.h b/include/mruby/version.h index fcdfb14d4..f1b16b415 100644 --- a/include/mruby/version.h +++ b/include/mruby/version.h @@ -57,7 +57,7 @@ MRB_BEGIN_DECL /* * Patch level string. (optional) */ -#define MRUBY_PATCHLEVEL_STR "RC" +#define MRUBY_PATCHLEVEL_STR "RC2" #ifndef MRUBY_PATCHLEVEL_STR # if MRUBY_PATCHLEVEL < 0 @@ -80,17 +80,17 @@ MRB_BEGIN_DECL /* * Release year. */ -#define MRUBY_RELEASE_YEAR 2023 +#define MRUBY_RELEASE_YEAR 2024 /* * Release month. */ -#define MRUBY_RELEASE_MONTH 12 +#define MRUBY_RELEASE_MONTH 1 /* * Release day. */ -#define MRUBY_RELEASE_DAY 29 +#define MRUBY_RELEASE_DAY 4 /* * Release date as a string. From 06466fd2e0380ab2d54c83d1175fd8923fd2b133 Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Sat, 10 Feb 2024 17:08:57 +0900 Subject: [PATCH 7/8] Merge branch 'dearblue-doc/mruby3.3.md' --- NEWS | 148 +++++++++++++++++++++++++++++++++++++++--------- doc/mruby3.3.md | 146 +++++++++++++++++++++++++++++++++++++++-------- 2 files changed, 243 insertions(+), 51 deletions(-) diff --git a/NEWS b/NEWS index a3893089c..7144b3a86 100644 --- a/NEWS +++ b/NEWS @@ -3,91 +3,187 @@ NEWS # User visible changes in `mruby3.3` from `mruby3.2` +"**_NOTE_**:" are changes to be aware of. + # The language -- aliases work properly with `super` -- `callee` method work differently with aliases in mruby -- define `Kernel#respond_to_missing?` method +- aliases work properly with `super` ([2ad3f0e](https://github.com/mruby/mruby/commit/2ad3f0e)) +- `callee` method work differently with aliases in mruby ([f2dc76e](https://github.com/mruby/mruby/commit/f2dc76e)) +- define `Kernel#respond_to_missing?` method ([347586e](https://github.com/mruby/mruby/commit/347586e)) - `_inspect` method (`inspect` with recursive check) is removed -- `__printstr` method is removed; use `print` instead + ([e2bbf75](https://github.com/mruby/mruby/commit/e2bbf75), [5cb0c74](https://github.com/mruby/mruby/commit/5cb0c74), [113565a](https://github.com/mruby/mruby/commit/113565a), + [0713f2a](https://github.com/mruby/mruby/commit/0713f2a), [6ae6b63](https://github.com/mruby/mruby/commit/6ae6b63), [fc9fffc](https://github.com/mruby/mruby/commit/fc9fffc)) +- `__printstr__` method is removed; use `print` instead + ([acecee0](https://github.com/mruby/mruby/commit/acecee0), [192e6e3](https://github.com/mruby/mruby/commit/192e6e3)) +- New method `String#bytesplice` ([5274647](https://github.com/mruby/mruby/commit/5274647), [a2e2e83](https://github.com/mruby/mruby/commit/a2e2e83)) +- Allow `return` in blocks to cross C boundaries ([#6125](https://github.com/mruby/mruby/pull/6125)) # Configuration -- mruby can be built using Docker now. Try `docker-compose build` for example. -- New Platform: Nintendo Wii -- Improved Platforms: Android, Dreamcast +- mruby can be built using Docker now. Try `docker-compose build` for example. ([#5961](https://github.com/mruby/mruby/pull/5961)) +- New Platform: DJGPP (MS-DOS) ([#6022](https://github.com/mruby/mruby/pull/6022)) +- New Platform: Nintendo Wii ([#6086](https://github.com/mruby/mruby/pull/6086)) +- Improved Platform: Android ([#6013](https://github.com/mruby/mruby/pull/6013)) +- Improved Platform: Dreamcast ([#6130](https://github.com/mruby/mruby/pull/6130)) +- Allow tests to be disabled for specific gems; warn about disabled tests ([#6012](https://github.com/mruby/mruby/pull/6012)) +- Replace `MRB_NO_DIRECT_THREADING` with `MRB_USE_VM_SWITCH_DISPATCH` ([#5902](https://github.com/mruby/mruby/pull/5902)) # mruby memory API -- `mrb_default_allocf` can be overridden by the application -- `mrb_open_allocf` will be deprecated +- `mrb_default_allocf` can be overridden by the application ([34c5d96](https://github.com/mruby/mruby/commit/34c5d96)) +- `mrb_open_allocf` will be deprecated ([cfee5c2](https://github.com/mruby/mruby/commit/cfee5c2)) -# mruby VM and bytecode +# Changes in C API -- [#5870](https://github.com/mruby/mruby/issues/5870) Use OP_LOADINEG instead of OP_LOADI +- add new error handling API functions ([8c8bbd9](https://github.com/mruby/mruby/commit/8c8bbd9)) +- Add `mrb_vm_ci_env_clear()` function with `MRB_API` ([#5945](https://github.com/mruby/mruby/pull/5945)) +- a new function `mrb_check_frozen_value()` ([ccdf75c](https://github.com/mruby/mruby/commit/ccdf75c)) +- avoid formatting in `mrb_bug()` ([82a48bd](https://github.com/mruby/mruby/commit/82a48bd))
+ **_NOTE_**: If you are using it, you must give a simple string or replace it with a call to `mrb_raise()` series. +- stop using `mrbc_` prefix for compiler context ([c5e3cbe](https://github.com/mruby/mruby/commit/c5e3cbe))
+ The same names are provided as before, but we recommend replacing them. +- Allow `Class#allocate` to be prohibited + ([#5979](https://github.com/mruby/mruby/pull/5979), [#6122](https://github.com/mruby/mruby/pull/6122), [#6123](https://github.com/mruby/mruby/pull/6123))
+ To disable `#allocate`, use `MRB_UNDEF_ALLOCATOR()`. + This is also automatically applied when the subclass is created, but to explicitly allow it, use `MRB_DEFINE_ALLOCATOR()`. # Changes in mrbgems -- mruby-bin-config: new options --cxx,--cxxflags,--as,--asflags,--objc,--objcflags -- mruby-binding-eval (merged with mruby-eval) #5989 -- mruby-binding: renamed from mruby-binding-core -- mruby-enumerator: remove internal attribute methods obj, args, kwd, meth, fib. -- mruby-fiber: Add a new mrb_fiber_new() with MRB_API -- mruby-fiber: Allows calling `Fiber#resume` from C -- mruby-fiber: `Fiber#to_s` format changed -- mruby-io: Add "x" mode option for IO.open -- mruby-method: `Method#to_s` format changed -- mruby-pack: support new directives j,J,b,B -- mruby-range-ext: new method `Range#overlap?` -- mruby-string-ext: Add `String#valid_encoding?` method +- **default.gembox**: Add mruby debugger mrdb (`mruby-bin-debugger`) ([#5966](https://github.com/mruby/mruby/pull/5966)) +- **mruby-bin-config**: new options `--cxx`, `--cxxflags`, `--as`, `--asflags`, `--objc`, `--objcflags` ([#6054](https://github.com/mruby/mruby/pull/6054)) +- **mruby-binding**: renamed from `mruby-binding-core` of mruby3.2 ([11af5db](https://github.com/mruby/mruby/commit/11af5db))
+ **_NOTE_**: If using `mruby-binding-core` of mruby 3.2, replace it with `mruby-binding`. +- **mruby-binding**: implemented `Binding#initialize_copy` method ([#5517](https://github.com/mruby/mruby/pull/5517)) +- **mruby-binding**: `Kernel#binding` responds only to calls from Ruby ([#5981](https://github.com/mruby/mruby/pull/5981)) +- **mruby-compar-ext**: Comparable#clamp to accept nil as arguments ([836bebc](https://github.com/mruby/mruby/commit/836bebc)) +- **mruby-compiler**: add print name for identifier tokens ([d7b2e3a](https://github.com/mruby/mruby/commit/d7b2e3a)) +- **mruby-data**: allow empty Data ([927a9df](https://github.com/mruby/mruby/commit/927a9df)) +- **mruby-enumerator**: remove internal attribute methods `obj`, `args`, `kwd`, `meth`, `fib`. ([735fa24](https://github.com/mruby/mruby/commit/735fa24)) +- **mruby-enumerator**: add Enumerator#size ([861f8bd](https://github.com/mruby/mruby/commit/861f8bd)) +- **mruby-eval**: merged `mruby-binding` of mruby3.2 ([501b22a](https://github.com/mruby/mruby/commit/501b22a), [#5989](https://github.com/mruby/mruby/pull/5989))
+ **_NOTE_**: If using `mruby-binding` of mruby 3.2, replace it with `mruby-eval`. +- **mruby-fiber**: Add a new `mrb_fiber_new()` with `MRB_API` ([#6097](https://github.com/mruby/mruby/pull/6097)) +- **mruby-fiber**: Allows calling `Fiber#resume` from C ([#6106](https://github.com/mruby/mruby/pull/6106)) +- **mruby-fiber**: `Fiber#to_s` format changed ([#6105](https://github.com/mruby/mruby/pull/6105)) +- **mruby-io**: add File#atime and File#ctime ([321cfe9](https://github.com/mruby/mruby/commit/321cfe9)) +- **mruby-io**: Add "x" mode option for `IO.open` ([#6081](https://github.com/mruby/mruby/pull/6081)) +- **mruby-io**: File.new should not take blocks ([53de964](https://github.com/mruby/mruby/commit/53de964)) +- **mruby-method**: `Method#to_s` format changed ([f5bc82f](https://github.com/mruby/mruby/commit/f5bc82f), [02f189c](https://github.com/mruby/mruby/commit/02f189c)) +- **mruby-numeric-ext**: `int.pow(n,m)` to take bigint as exponential ([d482eab](https://github.com/mruby/mruby/commit/d482eab)) +- **mruby-pack**: support new directives `j`, `J`, `b`, `B`, `#` + ([2a1e3a5](https://github.com/mruby/mruby/commit/2a1e3a5), [e7021f1](https://github.com/mruby/mruby/commit/e7021f1), [e17f325](https://github.com/mruby/mruby/commit/e17f325)) +- **mruby-range-ext**: new method `Range#overlap?` ([384d0e2](https://github.com/mruby/mruby/commit/384d0e2)) +- **mruby-string-ext**: Add `String#valid_encoding?` method ([eabe2d9](https://github.com/mruby/mruby/commit/eabe2d9)) +- **mruby-struct**: allow empty Struct when a name is not given ([c212ede](https://github.com/mruby/mruby/commit/c212ede)) +- **mruby-time**: should allow year before 1900 ([e5de08b](https://github.com/mruby/mruby/commit/e5de08b)) +- **mruby-time**: support bigint to time_t if necessary ([7096d27](https://github.com/mruby/mruby/commit/7096d27)) +- **mruby-time**: need to handle negative time_t ([b064d7e](https://github.com/mruby/mruby/commit/b064d7e)) + +# Changes in build system + +- Extended `rake install` task ([#5928](https://github.com/mruby/mruby/pull/5928))
+ **_NOTE_**: Due to this impact, executable files in the `mruby/bin/` directory by default are now symbolic links (batch files on Windows). + If previously relied on those executables, should be replaced with direct references to the entity created under the build directory (e.g. `mruby/build/host/bin/`). +- Encode and decode escape characters for presym ([#6011](https://github.com/mruby/mruby/pull/6011)) +- Rakefile: remove default build target directories in `deep_clean` ([#6032](https://github.com/mruby/mruby/pull/6032), [1e38569](https://github.com/mruby/mruby/commit/1e38569)) + +# Other breaking changes + +- `mrb_f_raise()` is now an internal function + ([#5923](https://github.com/mruby/mruby/pull/5923), [#6070](https://github.com/mruby/mruby/pull/6070)) +- `mrb_make_exception()` is now an internal function with different parameters + ([431f83e](https://github.com/mruby/mruby/commit/431f83e), [78137f3](https://github.com/mruby/mruby/commit/78137f3)) +- The `File#path` method no longer uses the `#to_path` method for implicit conversion + ([d86c4a7](https://github.com/mruby/mruby/commit/d86c4a7)) +- stop mrb isolation for each test file ([a20fbe5](https://github.com/mruby/mruby/commit/a20fbe5)) +- RBreak remembers the CI location ([#6103](https://github.com/mruby/mruby/pull/6103)) # Bugs Fixed -- [#5712](https://github.com/mruby/mruby/issues/5712) No "make install" -- [#5724](https://github.com/mruby/mruby/issues/5724) Rational#** is missing +- [#5724](https://github.com/mruby/mruby/issues/5724) Rational#\*\* is missing - [#5725](https://github.com/mruby/mruby/issues/5725) weird const_missing exceptions in mrblib code - [#5789](https://github.com/mruby/mruby/issues/5789) No memory release of backtrace information due to stack error +- [#5932](https://github.com/mruby/mruby/issues/5932) How to create a block using the C API? mrb_yield keeps crashing! - [#5943](https://github.com/mruby/mruby/issues/5943) TCPSocket#write is failed - [#5944](https://github.com/mruby/mruby/issues/5944) Behavior of calling method with a hash variable +- [#5946](https://github.com/mruby/mruby/pull/5946) Don't switch constant search path from modules to Object - [#5949](https://github.com/mruby/mruby/issues/5949) Caller appears to report wrong line when block passed and brackets omitted +- [0906cd7](https://github.com/mruby/mruby/commit/0906cd7) numeric.c: fix rounding function issues with big numbers - [#5974](https://github.com/mruby/mruby/issues/5974) Invalid escape sequences in gem_init.c on windows - [#5975](https://github.com/mruby/mruby/issues/5975) Equals comparison fails on extreme ends of 64-bit integers - [#5985](https://github.com/mruby/mruby/issues/5985) Sign extension with OP_LOADI32 in get_int_operand() - [#5986](https://github.com/mruby/mruby/issues/5986) Fix bugs in String#bytesplice - [#5987](https://github.com/mruby/mruby/issues/5987) ~(-1 << 64) is incorrect - [#5991](https://github.com/mruby/mruby/issues/5991) 'gets' method not working in mruby-3.2.0 +- [#5994](https://github.com/mruby/mruby/pull/5994) fix typo in mrbgems/mruby-io/src/io.c - [#5995](https://github.com/mruby/mruby/issues/5995) One seemingly unnecessary parameter is passed in the block parameters +- [#6008](https://github.com/mruby/mruby/pull/6008) Make "bintest" independent of directory +- [b47c8b7](https://github.com/mruby/mruby/commit/b47c8b7) gc.c (clear_all_old): fix a generational GC bug - [#6029](https://github.com/mruby/mruby/issues/6029) mruby build fails under mrbgems directory +- [a264965](https://github.com/mruby/mruby/commit/a264965) mruby-os-memsize/memsize.c: fix irep size calculation +- [3310e10](https://github.com/mruby/mruby/commit/3310e10) mruby-test/mrbgem.rake: fix mrb_state handling bug - [#6041](https://github.com/mruby/mruby/issues/6041) GC Performance may have degraded +- [#6044](https://github.com/mruby/mruby/issues/6044) Generated presym/table.h contains invalid characters - [#6051](https://github.com/mruby/mruby/issues/6051) Null pointer dereference in mrb_addrinfo_unix_path - [#6052](https://github.com/mruby/mruby/issues/6052) Null pointer dereference while handling the Proc class +- [#6055](https://github.com/mruby/mruby/pull/6055) Fix libmruby name for VisualC++ +- [#6060](https://github.com/mruby/mruby/issues/6060) SEGFAULT Issue Related to Fiber Usage in ngx_mruby Development +- [#6061](https://github.com/mruby/mruby/issues/6061) Performance issue in String#codepoints +- [#6064](https://github.com/mruby/mruby/issues/6064) MRUBY_PACKAGE_DIR does not always have a value. - [#6065](https://github.com/mruby/mruby/issues/6065) Null pointer dereference while handling the Proc class - [#6066](https://github.com/mruby/mruby/issues/6066) Null pointer dereference involving Struct.new() - [#6067](https://github.com/mruby/mruby/issues/6067) Null pointer dereference in mrb_string_value_cstr - [#6068](https://github.com/mruby/mruby/issues/6068) Stack overflow in mrb_vm_exec +- [#6076](https://github.com/mruby/mruby/pull/6076) Fixed unwinding block that could point to invalid PC +- [#6084](https://github.com/mruby/mruby/issues/6084) Incorrect symbolic sinks in binary built on Linux - [#6087](https://github.com/mruby/mruby/issues/6087) 'Remote branch HEAD not found in upstream origin' error on build - [#6089](https://github.com/mruby/mruby/issues/6089) binding.eval() handles def expressions differently from CRuby - [#6098](https://github.com/mruby/mruby/issues/6098) Fails to call superclass of wrapped method +- [#6099](https://github.com/mruby/mruby/issues/6099) `ensure` section is not executed if the function exits via a return in a proc - [#6108](https://github.com/mruby/mruby/issues/6108) VM crashes with break +- [#6118](https://github.com/mruby/mruby/pull/6118) Fixed IO#read with buf +- [#6120](https://github.com/mruby/mruby/pull/6120) Set EBADF if check_file_descriptor() fails +- [#6126](https://github.com/mruby/mruby/pull/6126) Fixed return value of `OP_RETURN_BLK` called directly under C function - [#6134](https://github.com/mruby/mruby/issues/6134) String#unpack1 returns an array instead of a single string +- [#6136](https://github.com/mruby/mruby/pull/6136) Fixed when combined `mrb_fiber_resume()` and `Fiber#transfer` # Pull Requests (User Visible Ones) -- [#5870](https://github.com/mruby/mruby/pull/5870) Use OP_LOADINEG instead of OP_LOADI +- [#5517](https://github.com/mruby/mruby/pull/5517) Fixed local variables not separated between copied binding objects +- [#5902](https://github.com/mruby/mruby/pull/5902) Replace `MRB_NO_DIRECT_THREADING` with `MRB_USE_VM_SWITCH_DISPATCH` +- [#5923](https://github.com/mruby/mruby/pull/5923) Demotion `mrb_f_raise()` from `MRB_API` +- [#5928](https://github.com/mruby/mruby/pull/5928) Improved `rake install` +- [#5945](https://github.com/mruby/mruby/pull/5945) Avoid exposure for `REnv` objects +- [#5946](https://github.com/mruby/mruby/pull/5946) Don't switch constant search path from modules to Object - [#5966](https://github.com/mruby/mruby/pull/5966) Update default.gembox add mruby debugger mrdb - [#5979](https://github.com/mruby/mruby/pull/5979) Allow Class#allocate to be prohibited +- [#5981](https://github.com/mruby/mruby/pull/5981) `Kernel#binding` responds only to calls from Ruby - [#5989](https://github.com/mruby/mruby/pull/5989) Integrate mruby-binding-eval into mruby-eval - [#5961](https://github.com/mruby/mruby/pull/5961) Add Docker to build and run all mruby tests. Run pre-commit and generate YARD docs with Docker +- [#5994](https://github.com/mruby/mruby/pull/5994) fix typo in mrbgems/mruby-io/src/io.c - [#6008](https://github.com/mruby/mruby/pull/6008) Make "bintest" independent of directory - [#6009](https://github.com/mruby/mruby/pull/6009) Avoid adding /bintest which does not exist +- [#6011](https://github.com/mruby/mruby/pull/6011) Encode and decode escape characters for presym - [#6012](https://github.com/mruby/mruby/pull/6012) Allow tests to be disabled for specific gems; warn about disabled tests - [#6013](https://github.com/mruby/mruby/pull/6013) Fix Android toolchain +- [#6022](https://github.com/mruby/mruby/pull/6022) Build configuration for MS-DOS and DJGPP - [#6032](https://github.com/mruby/mruby/pull/6032) Rake: update task clean to remove bin and build folders - [#6045](https://github.com/mruby/mruby/pull/6045) Fixes escape sequence bug and enhancements in Presym scanning +- [#6054](https://github.com/mruby/mruby/pull/6054) Extends `bin/mruby-config` +- [#6055](https://github.com/mruby/mruby/pull/6055) Fix libmruby name for VisualC++ +- [#6070](https://github.com/mruby/mruby/pull/6070) Demotion mrb_f_raise() in kernel.c from MRB_API too - [#6076](https://github.com/mruby/mruby/pull/6076) Fixed unwinding block that could point to invalid PC - [#6081](https://github.com/mruby/mruby/pull/6081) Add "x" mode option for IO.open - [#6086](https://github.com/mruby/mruby/pull/6086) Add build config for Nintendo Wii - [#6097](https://github.com/mruby/mruby/pull/6097) Add a new mrb_fiber_new() with MRB_API +- [#6103](https://github.com/mruby/mruby/pull/6103) RBreak remembers the CI location +- [#6105](https://github.com/mruby/mruby/pull/6105) Implement `Fiber#to_s` method - [#6106](https://github.com/mruby/mruby/pull/6106) Ease fiber limitations - [#6118](https://github.com/mruby/mruby/pull/6118) Fixed IO#read with buf - [#6120](https://github.com/mruby/mruby/pull/6120) Set EBADF if check_file_descriptor() fails +- [#6122](https://github.com/mruby/mruby/pull/6122) Prohibit `Class#allocate` in a different way +- [#6123](https://github.com/mruby/mruby/pull/6123) Inherit `MRB_FL_UNDEF_ALLOCATE` in subclasses +- [#6125](https://github.com/mruby/mruby/pull/6125) Allow `OP_RETURN_BLK` to cross C boundaries +- [#6126](https://github.com/mruby/mruby/pull/6126) Fixed return value of `OP_RETURN_BLK` called directly under C function +- [#6130](https://github.com/mruby/mruby/pull/6130) `dreamcast_shelf build config`: complete overhaul +- [#6136](https://github.com/mruby/mruby/pull/6136) Fixed when combined `mrb_fiber_resume()` and `Fiber#transfer` diff --git a/doc/mruby3.3.md b/doc/mruby3.3.md index 5fc5ca4eb..eec7732fb 100644 --- a/doc/mruby3.3.md +++ b/doc/mruby3.3.md @@ -1,90 +1,186 @@ # User visible changes in `mruby3.3` from `mruby3.2` +"**_NOTE_**:" are changes to be aware of. + # The language -- aliases work properly with `super` -- `callee` method work differently with aliases in mruby -- define `Kernel#respond_to_missing?` method +- aliases work properly with `super` ([2ad3f0e](https://github.com/mruby/mruby/commit/2ad3f0e)) +- `callee` method work differently with aliases in mruby ([f2dc76e](https://github.com/mruby/mruby/commit/f2dc76e)) +- define `Kernel#respond_to_missing?` method ([347586e](https://github.com/mruby/mruby/commit/347586e)) - `_inspect` method (`inspect` with recursive check) is removed -- `__printstr` method is removed; use `print` instead + ([e2bbf75](https://github.com/mruby/mruby/commit/e2bbf75), [5cb0c74](https://github.com/mruby/mruby/commit/5cb0c74), [113565a](https://github.com/mruby/mruby/commit/113565a), + [0713f2a](https://github.com/mruby/mruby/commit/0713f2a), [6ae6b63](https://github.com/mruby/mruby/commit/6ae6b63), [fc9fffc](https://github.com/mruby/mruby/commit/fc9fffc)) +- `__printstr__` method is removed; use `print` instead + ([acecee0](https://github.com/mruby/mruby/commit/acecee0), [192e6e3](https://github.com/mruby/mruby/commit/192e6e3)) +- New method `String#bytesplice` ([5274647](https://github.com/mruby/mruby/commit/5274647), [a2e2e83](https://github.com/mruby/mruby/commit/a2e2e83)) +- Allow `return` in blocks to cross C boundaries ([#6125](https://github.com/mruby/mruby/pull/6125)) # Configuration -- mruby can be built using Docker now. Try `docker-compose build` for example. -- New Platform: Nintendo Wii -- Improved Platforms: Android, Dreamcast +- mruby can be built using Docker now. Try `docker-compose build` for example. ([#5961](https://github.com/mruby/mruby/pull/5961)) +- New Platform: DJGPP (MS-DOS) ([#6022](https://github.com/mruby/mruby/pull/6022)) +- New Platform: Nintendo Wii ([#6086](https://github.com/mruby/mruby/pull/6086)) +- Improved Platform: Android ([#6013](https://github.com/mruby/mruby/pull/6013)) +- Improved Platform: Dreamcast ([#6130](https://github.com/mruby/mruby/pull/6130)) +- Allow tests to be disabled for specific gems; warn about disabled tests ([#6012](https://github.com/mruby/mruby/pull/6012)) +- Replace `MRB_NO_DIRECT_THREADING` with `MRB_USE_VM_SWITCH_DISPATCH` ([#5902](https://github.com/mruby/mruby/pull/5902)) # mruby memory API -- `mrb_default_allocf` can be overridden by the application -- `mrb_open_allocf` will be deprecated +- `mrb_default_allocf` can be overridden by the application ([34c5d96](https://github.com/mruby/mruby/commit/34c5d96)) +- `mrb_open_allocf` will be deprecated ([cfee5c2](https://github.com/mruby/mruby/commit/cfee5c2)) -# mruby VM and bytecode +# Changes in C API -- [#5870](https://github.com/mruby/mruby/issues/5870) Use OP_LOADINEG instead of OP_LOADI +- add new error handling API functions ([8c8bbd9](https://github.com/mruby/mruby/commit/8c8bbd9)) +- Add `mrb_vm_ci_env_clear()` function with `MRB_API` ([#5945](https://github.com/mruby/mruby/pull/5945)) +- a new function `mrb_check_frozen_value()` ([ccdf75c](https://github.com/mruby/mruby/commit/ccdf75c)) +- avoid formatting in `mrb_bug()` ([82a48bd](https://github.com/mruby/mruby/commit/82a48bd))
+ **_NOTE_**: If you are using it, you must give a simple string or replace it with a call to `mrb_raise()` series. +- stop using `mrbc_` prefix for compiler context ([c5e3cbe](https://github.com/mruby/mruby/commit/c5e3cbe))
+ The same names are provided as before, but we recommend replacing them. +- Allow `Class#allocate` to be prohibited + ([#5979](https://github.com/mruby/mruby/pull/5979), [#6122](https://github.com/mruby/mruby/pull/6122), [#6123](https://github.com/mruby/mruby/pull/6123))
+ To disable `#allocate`, use `MRB_UNDEF_ALLOCATOR()`. + This is also automatically applied when the subclass is created, but to explicitly allow it, use `MRB_DEFINE_ALLOCATOR()`. # Changes in mrbgems -- mruby-bin-config: new options --cxx,--cxxflags,--as,--asflags,--objc,--objcflags -- mruby-binding-eval (merged with mruby-eval) #5989 -- mruby-binding: renamed from mruby-binding-core -- mruby-enumerator: remove internal attribute methods obj, args, kwd, meth, fib. -- mruby-fiber: Add a new mrb_fiber_new() with MRB_API -- mruby-fiber: Allows calling `Fiber#resume` from C -- mruby-fiber: `Fiber#to_s` format changed -- mruby-io: Add "x" mode option for IO.open -- mruby-method: `Method#to_s` format changed -- mruby-pack: support new directives j,J,b,B -- mruby-range-ext: new method `Range#overlap?` -- mruby-string-ext: Add `String#valid_encoding?` method +- **default.gembox**: Add mruby debugger mrdb (`mruby-bin-debugger`) ([#5966](https://github.com/mruby/mruby/pull/5966)) +- **mruby-bin-config**: new options `--cxx`, `--cxxflags`, `--as`, `--asflags`, `--objc`, `--objcflags` ([#6054](https://github.com/mruby/mruby/pull/6054)) +- **mruby-binding**: renamed from `mruby-binding-core` of mruby3.2 ([11af5db](https://github.com/mruby/mruby/commit/11af5db))
+ **_NOTE_**: If using `mruby-binding-core` of mruby 3.2, replace it with `mruby-binding`. +- **mruby-binding**: implemented `Binding#initialize_copy` method ([#5517](https://github.com/mruby/mruby/pull/5517)) +- **mruby-binding**: `Kernel#binding` responds only to calls from Ruby ([#5981](https://github.com/mruby/mruby/pull/5981)) +- **mruby-compar-ext**: Comparable#clamp to accept nil as arguments ([836bebc](https://github.com/mruby/mruby/commit/836bebc)) +- **mruby-compiler**: add print name for identifier tokens ([d7b2e3a](https://github.com/mruby/mruby/commit/d7b2e3a)) +- **mruby-data**: allow empty Data ([927a9df](https://github.com/mruby/mruby/commit/927a9df)) +- **mruby-enumerator**: remove internal attribute methods `obj`, `args`, `kwd`, `meth`, `fib`. ([735fa24](https://github.com/mruby/mruby/commit/735fa24)) +- **mruby-enumerator**: add Enumerator#size ([861f8bd](https://github.com/mruby/mruby/commit/861f8bd)) +- **mruby-eval**: merged `mruby-binding` of mruby3.2 ([501b22a](https://github.com/mruby/mruby/commit/501b22a), [#5989](https://github.com/mruby/mruby/pull/5989))
+ **_NOTE_**: If using `mruby-binding` of mruby 3.2, replace it with `mruby-eval`. +- **mruby-fiber**: Add a new `mrb_fiber_new()` with `MRB_API` ([#6097](https://github.com/mruby/mruby/pull/6097)) +- **mruby-fiber**: Allows calling `Fiber#resume` from C ([#6106](https://github.com/mruby/mruby/pull/6106)) +- **mruby-fiber**: `Fiber#to_s` format changed ([#6105](https://github.com/mruby/mruby/pull/6105)) +- **mruby-io**: add File#atime and File#ctime ([321cfe9](https://github.com/mruby/mruby/commit/321cfe9)) +- **mruby-io**: Add "x" mode option for `IO.open` ([#6081](https://github.com/mruby/mruby/pull/6081)) +- **mruby-io**: File.new should not take blocks ([53de964](https://github.com/mruby/mruby/commit/53de964)) +- **mruby-method**: `Method#to_s` format changed ([f5bc82f](https://github.com/mruby/mruby/commit/f5bc82f), [02f189c](https://github.com/mruby/mruby/commit/02f189c)) +- **mruby-numeric-ext**: `int.pow(n,m)` to take bigint as exponential ([d482eab](https://github.com/mruby/mruby/commit/d482eab)) +- **mruby-pack**: support new directives `j`, `J`, `b`, `B`, `#` + ([2a1e3a5](https://github.com/mruby/mruby/commit/2a1e3a5), [e7021f1](https://github.com/mruby/mruby/commit/e7021f1), [e17f325](https://github.com/mruby/mruby/commit/e17f325)) +- **mruby-range-ext**: new method `Range#overlap?` ([384d0e2](https://github.com/mruby/mruby/commit/384d0e2)) +- **mruby-string-ext**: Add `String#valid_encoding?` method ([eabe2d9](https://github.com/mruby/mruby/commit/eabe2d9)) +- **mruby-struct**: allow empty Struct when a name is not given ([c212ede](https://github.com/mruby/mruby/commit/c212ede)) +- **mruby-time**: should allow year before 1900 ([e5de08b](https://github.com/mruby/mruby/commit/e5de08b)) +- **mruby-time**: support bigint to time_t if necessary ([7096d27](https://github.com/mruby/mruby/commit/7096d27)) +- **mruby-time**: need to handle negative time_t ([b064d7e](https://github.com/mruby/mruby/commit/b064d7e)) + +# Changes in build system + +- Extended `rake install` task ([#5928](https://github.com/mruby/mruby/pull/5928))
+ **_NOTE_**: Due to this impact, executable files in the `mruby/bin/` directory by default are now symbolic links (batch files on Windows). + If previously relied on those executables, should be replaced with direct references to the entity created under the build directory (e.g. `mruby/build/host/bin/`). +- Encode and decode escape characters for presym ([#6011](https://github.com/mruby/mruby/pull/6011)) +- Rakefile: remove default build target directories in `deep_clean` ([#6032](https://github.com/mruby/mruby/pull/6032), [1e38569](https://github.com/mruby/mruby/commit/1e38569)) + +# Other breaking changes + +- `mrb_f_raise()` is now an internal function + ([#5923](https://github.com/mruby/mruby/pull/5923), [#6070](https://github.com/mruby/mruby/pull/6070)) +- `mrb_make_exception()` is now an internal function with different parameters + ([431f83e](https://github.com/mruby/mruby/commit/431f83e), [78137f3](https://github.com/mruby/mruby/commit/78137f3)) +- The `File#path` method no longer uses the `#to_path` method for implicit conversion + ([d86c4a7](https://github.com/mruby/mruby/commit/d86c4a7)) +- stop mrb isolation for each test file ([a20fbe5](https://github.com/mruby/mruby/commit/a20fbe5)) +- RBreak remembers the CI location ([#6103](https://github.com/mruby/mruby/pull/6103)) # Bugs Fixed -- [#5712](https://github.com/mruby/mruby/issues/5712) No "make install" - [#5724](https://github.com/mruby/mruby/issues/5724) Rational#\*\* is missing - [#5725](https://github.com/mruby/mruby/issues/5725) weird const_missing exceptions in mrblib code - [#5789](https://github.com/mruby/mruby/issues/5789) No memory release of backtrace information due to stack error +- [#5932](https://github.com/mruby/mruby/issues/5932) How to create a block using the C API? mrb_yield keeps crashing! - [#5943](https://github.com/mruby/mruby/issues/5943) TCPSocket#write is failed - [#5944](https://github.com/mruby/mruby/issues/5944) Behavior of calling method with a hash variable +- [#5946](https://github.com/mruby/mruby/pull/5946) Don't switch constant search path from modules to Object - [#5949](https://github.com/mruby/mruby/issues/5949) Caller appears to report wrong line when block passed and brackets omitted +- [0906cd7](https://github.com/mruby/mruby/commit/0906cd7) numeric.c: fix rounding function issues with big numbers - [#5974](https://github.com/mruby/mruby/issues/5974) Invalid escape sequences in gem_init.c on windows - [#5975](https://github.com/mruby/mruby/issues/5975) Equals comparison fails on extreme ends of 64-bit integers - [#5985](https://github.com/mruby/mruby/issues/5985) Sign extension with OP_LOADI32 in get_int_operand() - [#5986](https://github.com/mruby/mruby/issues/5986) Fix bugs in String#bytesplice - [#5987](https://github.com/mruby/mruby/issues/5987) ~(-1 << 64) is incorrect - [#5991](https://github.com/mruby/mruby/issues/5991) 'gets' method not working in mruby-3.2.0 +- [#5994](https://github.com/mruby/mruby/pull/5994) fix typo in mrbgems/mruby-io/src/io.c - [#5995](https://github.com/mruby/mruby/issues/5995) One seemingly unnecessary parameter is passed in the block parameters +- [#6008](https://github.com/mruby/mruby/pull/6008) Make "bintest" independent of directory +- [b47c8b7](https://github.com/mruby/mruby/commit/b47c8b7) gc.c (clear_all_old): fix a generational GC bug - [#6029](https://github.com/mruby/mruby/issues/6029) mruby build fails under mrbgems directory +- [a264965](https://github.com/mruby/mruby/commit/a264965) mruby-os-memsize/memsize.c: fix irep size calculation +- [3310e10](https://github.com/mruby/mruby/commit/3310e10) mruby-test/mrbgem.rake: fix mrb_state handling bug - [#6041](https://github.com/mruby/mruby/issues/6041) GC Performance may have degraded +- [#6044](https://github.com/mruby/mruby/issues/6044) Generated presym/table.h contains invalid characters - [#6051](https://github.com/mruby/mruby/issues/6051) Null pointer dereference in mrb_addrinfo_unix_path - [#6052](https://github.com/mruby/mruby/issues/6052) Null pointer dereference while handling the Proc class +- [#6055](https://github.com/mruby/mruby/pull/6055) Fix libmruby name for VisualC++ +- [#6060](https://github.com/mruby/mruby/issues/6060) SEGFAULT Issue Related to Fiber Usage in ngx_mruby Development +- [#6061](https://github.com/mruby/mruby/issues/6061) Performance issue in String#codepoints +- [#6064](https://github.com/mruby/mruby/issues/6064) MRUBY_PACKAGE_DIR does not always have a value. - [#6065](https://github.com/mruby/mruby/issues/6065) Null pointer dereference while handling the Proc class - [#6066](https://github.com/mruby/mruby/issues/6066) Null pointer dereference involving Struct.new() - [#6067](https://github.com/mruby/mruby/issues/6067) Null pointer dereference in mrb_string_value_cstr - [#6068](https://github.com/mruby/mruby/issues/6068) Stack overflow in mrb_vm_exec +- [#6076](https://github.com/mruby/mruby/pull/6076) Fixed unwinding block that could point to invalid PC +- [#6084](https://github.com/mruby/mruby/issues/6084) Incorrect symbolic sinks in binary built on Linux - [#6087](https://github.com/mruby/mruby/issues/6087) 'Remote branch HEAD not found in upstream origin' error on build - [#6089](https://github.com/mruby/mruby/issues/6089) binding.eval() handles def expressions differently from CRuby - [#6098](https://github.com/mruby/mruby/issues/6098) Fails to call superclass of wrapped method +- [#6099](https://github.com/mruby/mruby/issues/6099) `ensure` section is not executed if the function exits via a return in a proc - [#6108](https://github.com/mruby/mruby/issues/6108) VM crashes with break +- [#6118](https://github.com/mruby/mruby/pull/6118) Fixed IO#read with buf +- [#6120](https://github.com/mruby/mruby/pull/6120) Set EBADF if check_file_descriptor() fails +- [#6126](https://github.com/mruby/mruby/pull/6126) Fixed return value of `OP_RETURN_BLK` called directly under C function - [#6134](https://github.com/mruby/mruby/issues/6134) String#unpack1 returns an array instead of a single string +- [#6136](https://github.com/mruby/mruby/pull/6136) Fixed when combined `mrb_fiber_resume()` and `Fiber#transfer` # Pull Requests (User Visible Ones) -- [#5870](https://github.com/mruby/mruby/pull/5870) Use OP_LOADINEG instead of OP_LOADI +- [#5517](https://github.com/mruby/mruby/pull/5517) Fixed local variables not separated between copied binding objects +- [#5902](https://github.com/mruby/mruby/pull/5902) Replace `MRB_NO_DIRECT_THREADING` with `MRB_USE_VM_SWITCH_DISPATCH` +- [#5923](https://github.com/mruby/mruby/pull/5923) Demotion `mrb_f_raise()` from `MRB_API` +- [#5928](https://github.com/mruby/mruby/pull/5928) Improved `rake install` +- [#5945](https://github.com/mruby/mruby/pull/5945) Avoid exposure for `REnv` objects +- [#5946](https://github.com/mruby/mruby/pull/5946) Don't switch constant search path from modules to Object - [#5966](https://github.com/mruby/mruby/pull/5966) Update default.gembox add mruby debugger mrdb - [#5979](https://github.com/mruby/mruby/pull/5979) Allow Class#allocate to be prohibited +- [#5981](https://github.com/mruby/mruby/pull/5981) `Kernel#binding` responds only to calls from Ruby - [#5989](https://github.com/mruby/mruby/pull/5989) Integrate mruby-binding-eval into mruby-eval - [#5961](https://github.com/mruby/mruby/pull/5961) Add Docker to build and run all mruby tests. Run pre-commit and generate YARD docs with Docker +- [#5994](https://github.com/mruby/mruby/pull/5994) fix typo in mrbgems/mruby-io/src/io.c - [#6008](https://github.com/mruby/mruby/pull/6008) Make "bintest" independent of directory - [#6009](https://github.com/mruby/mruby/pull/6009) Avoid adding /bintest which does not exist +- [#6011](https://github.com/mruby/mruby/pull/6011) Encode and decode escape characters for presym - [#6012](https://github.com/mruby/mruby/pull/6012) Allow tests to be disabled for specific gems; warn about disabled tests - [#6013](https://github.com/mruby/mruby/pull/6013) Fix Android toolchain +- [#6022](https://github.com/mruby/mruby/pull/6022) Build configuration for MS-DOS and DJGPP - [#6032](https://github.com/mruby/mruby/pull/6032) Rake: update task clean to remove bin and build folders - [#6045](https://github.com/mruby/mruby/pull/6045) Fixes escape sequence bug and enhancements in Presym scanning +- [#6054](https://github.com/mruby/mruby/pull/6054) Extends `bin/mruby-config` +- [#6055](https://github.com/mruby/mruby/pull/6055) Fix libmruby name for VisualC++ +- [#6070](https://github.com/mruby/mruby/pull/6070) Demotion mrb_f_raise() in kernel.c from MRB_API too - [#6076](https://github.com/mruby/mruby/pull/6076) Fixed unwinding block that could point to invalid PC - [#6081](https://github.com/mruby/mruby/pull/6081) Add "x" mode option for IO.open - [#6086](https://github.com/mruby/mruby/pull/6086) Add build config for Nintendo Wii - [#6097](https://github.com/mruby/mruby/pull/6097) Add a new mrb_fiber_new() with MRB_API +- [#6103](https://github.com/mruby/mruby/pull/6103) RBreak remembers the CI location +- [#6105](https://github.com/mruby/mruby/pull/6105) Implement `Fiber#to_s` method - [#6106](https://github.com/mruby/mruby/pull/6106) Ease fiber limitations - [#6118](https://github.com/mruby/mruby/pull/6118) Fixed IO#read with buf - [#6120](https://github.com/mruby/mruby/pull/6120) Set EBADF if check_file_descriptor() fails +- [#6122](https://github.com/mruby/mruby/pull/6122) Prohibit `Class#allocate` in a different way +- [#6123](https://github.com/mruby/mruby/pull/6123) Inherit `MRB_FL_UNDEF_ALLOCATE` in subclasses +- [#6125](https://github.com/mruby/mruby/pull/6125) Allow `OP_RETURN_BLK` to cross C boundaries +- [#6126](https://github.com/mruby/mruby/pull/6126) Fixed return value of `OP_RETURN_BLK` called directly under C function +- [#6130](https://github.com/mruby/mruby/pull/6130) `dreamcast_shelf build config`: complete overhaul +- [#6136](https://github.com/mruby/mruby/pull/6136) Fixed when combined `mrb_fiber_resume()` and `Fiber#transfer` From 32279e4128527bab4c961854b9cce727a060abea Mon Sep 17 00:00:00 2001 From: mimaki Date: Wed, 14 Feb 2024 13:25:11 +0900 Subject: [PATCH 8/8] Update version and release date. (mruby 3.3.0 (2024-02-14)) --- Doxyfile | 2 +- README.md | 4 +--- doc/guides/debugger.md | 2 +- include/mruby/version.h | 6 +++--- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/Doxyfile b/Doxyfile index 3a66c141f..2df76d8c3 100644 --- a/Doxyfile +++ b/Doxyfile @@ -48,7 +48,7 @@ PROJECT_NAME = mruby # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 3.2.0 +PROJECT_NUMBER = 3.3.0 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/README.md b/README.md index 5e3d86c5f..21ee55c6f 100644 --- a/README.md +++ b/README.md @@ -30,12 +30,10 @@ of the Ministry of Economy, Trade and Industry of Japan. ## How to get mruby -To get mruby, you can download the stable version 3.2.0 from the official mruby +To get mruby, you can download the stable version 3.3.0 from the official mruby GitHub repository or clone the trunk of the mruby source tree with the "git clone" command. You can also install and compile mruby using [ruby-install](https://github.com/postmodern/ruby-install), [ruby-build](https://github.com/rbenv/ruby-build) or [rvm](https://github.com/rvm/rvm). -The release candidate version 3.3.0 of mruby can be downloaded via the following URL: [https://github.com/mruby/mruby/archive/3.3.0-rc2.zip](https://github.com/mruby/mruby/archive/3.3.0-rc2.zip) - The latest development version of mruby can be downloaded via the following URL: [https://github.com/mruby/mruby/zipball/master](https://github.com/mruby/mruby/zipball/master) The trunk of the mruby source tree can be checked out with the diff --git a/doc/guides/debugger.md b/doc/guides/debugger.md index dba9fb57d..4e52b7b8b 100644 --- a/doc/guides/debugger.md +++ b/doc/guides/debugger.md @@ -38,7 +38,7 @@ To confirm mrdb was installed properly, run mrdb with the `--version` option: ```bash $ mrdb --version -mruby 3.2.0 (2023-02-24) +mruby 3.3.0 (2024-02-14) ``` ## 2.2 Basic Operation diff --git a/include/mruby/version.h b/include/mruby/version.h index f1b16b415..2562603c7 100644 --- a/include/mruby/version.h +++ b/include/mruby/version.h @@ -57,7 +57,7 @@ MRB_BEGIN_DECL /* * Patch level string. (optional) */ -#define MRUBY_PATCHLEVEL_STR "RC2" +#define MRUBY_PATCHLEVEL_STR "" #ifndef MRUBY_PATCHLEVEL_STR # if MRUBY_PATCHLEVEL < 0 @@ -85,12 +85,12 @@ MRB_BEGIN_DECL /* * Release month. */ -#define MRUBY_RELEASE_MONTH 1 +#define MRUBY_RELEASE_MONTH 2 /* * Release day. */ -#define MRUBY_RELEASE_DAY 4 +#define MRUBY_RELEASE_DAY 14 /* * Release date as a string.