-*- coding: utf-8 -*- commit b200bad6cd40d08e9f33b93e1a85c270b337867c Author: nagachika AuthorDate: 2025-04-09 18:23:04 +0900 Commit: nagachika CommitDate: 2025-04-09 18:23:04 +0900 bump teeny commit 4ca521e91342165ed35cb12c9868f10e2a6aa07c Author: nagachika AuthorDate: 2025-04-09 17:27:37 +0900 Commit: nagachika CommitDate: 2025-04-09 17:27:37 +0900 merge revision(s) 06919949a60b42a8f30e8bd0cb075e17b05eebcd, 51bc992822f9108ad64de32d300e1cefd0e2da59, 42daa6c2a2b49b4e45f40736e25c7d182860f24a: [Backport #21141] [Bug #21141] [DOC] Clarify what time is in UTC [Bug #21141] [DOC] Refine description of `Time#utc?` [Bug #21141] [DOC] Fix indentation commit a67e9e41846cdadad9bb2d9e9d10223c52253898 Author: nagachika AuthorDate: 2025-04-07 21:19:10 +0900 Commit: nagachika CommitDate: 2025-04-07 21:19:10 +0900 merge revision(s) 3a7b9ca93b91dcc086b9ac8b9957e59268f9493b: [Backport #21217] Fix `Integer.sqrt` to never exceed actual value `Integer.sqrt` uses `sqrt(3)` from libm for small values. This method must return a value less than or equal to the actual integer square root, but libm's sqrt does not always guarantee that. This change corrects that by decrementing the result if necessary. Fixes [Bug #21217] commit 5640fea8aada2380145375a7f9eac2b979fe1258 Author: nagachika AuthorDate: 2025-04-06 13:42:21 +0900 Commit: nagachika CommitDate: 2025-04-06 13:42:21 +0900 Update prism test snapshots. This is follow-up for 7c315e23983a35d29108d9ba8c914d6320254d43. commit 7c315e23983a35d29108d9ba8c914d6320254d43 Author: nagachika AuthorDate: 2025-04-06 11:24:36 +0900 Commit: nagachika CommitDate: 2025-04-06 11:31:57 +0900 merge revision(s) 117d6e145a0270ab8fc9134403519ef13b9ebb24: [Backport #21027] [ruby/prism] Fix `not` receiver `not foo` should be `!foo` `not()` should be `!nil` Fixes [Bug #21027] https://github.com/ruby/prism/commit/871ed4b462 commit a1679f0d83845a35116d4e40bba4783346c8d7dc Author: Hiroshi SHIBATA AuthorDate: 2025-04-03 19:30:24 +0900 Commit: Hiroshi SHIBATA CommitDate: 2025-04-04 07:38:52 +0900 Use EnvUtil.apply_timeout_scale commit f2ee22f32d3b4919b9a5b62a81b544019383ef3a Author: Hiroshi SHIBATA AuthorDate: 2025-04-03 19:07:08 +0900 Commit: Hiroshi SHIBATA CommitDate: 2025-04-04 07:38:52 +0900 Extend open_timeout for test failure on s390x https://rubyci.s3.amazonaws.com/s390x/ruby-master/log/20250403T060004Z.fail.html.gz commit 7065e60318c970655eb561829a2071c310b67e2d Author: Hiroshi SHIBATA AuthorDate: 2025-04-03 14:18:55 +0900 Commit: Hiroshi SHIBATA CommitDate: 2025-04-03 19:41:48 +0900 Use IPv4 for test server because TestNetHTTPS is failing with s390x https://rubyci.s3.amazonaws.com/s390x/ruby-3.2/log/20250403T005659Z.fail.html.gz commit c48219e2d738faa388e61361c0549f7addbfacfe Author: Hiroshi SHIBATA AuthorDate: 2025-04-03 13:04:31 +0900 Commit: Hiroshi SHIBATA CommitDate: 2025-04-03 14:10:39 +0900 f7059af50a31 is also required at ractor_core.h commit 31c295ef28fc678d8416f1f35726ac43d470d1d3 Author: Hiroshi SHIBATA AuthorDate: 2025-04-03 09:40:11 +0900 Commit: Hiroshi SHIBATA CommitDate: 2025-04-03 12:54:11 +0900 Enforce to use CMake 3 because CMake 4 is not compatible to build libyaml via vcpkg commit 3d8a66568e8106b367665d716e0d3c8c8208aa07 Author: nagachika AuthorDate: 2025-04-02 21:16:22 +0900 Commit: nagachika CommitDate: 2025-04-02 21:16:47 +0900 merge revision(s) d78ff6a767ca813ac5fa178dd7611f20a993c191: [Backport #20984] [Bug #20984] Fix test with locale encoding commit ca0238353dd594c1012b7263b83e0c7eeb882cf4 Author: Hiroshi SHIBATA AuthorDate: 2025-04-01 15:20:17 +0900 Commit: Hiroshi SHIBATA CommitDate: 2025-04-02 10:35:49 +0900 [rubygems/rubygems] Bump up minimum required version for cmake 4 https://github.com/rubygems/rubygems/commit/3e77caeddf commit 51dee044c1cb079a463118c5113ae9fdf96e463e Author: nagachika AuthorDate: 2025-03-30 12:11:59 +0900 Commit: nagachika CommitDate: 2025-03-30 12:11:59 +0900 merge revision(s) 5f77f9bea61fb4cc8447a76e191fdfb28f076862: [Backport #21195] Fix handling of `error`/`errno` in `io_internal_wait`. (#12961) [Bug #21195] commit aac5c546cd35ff0aeab120e3724fbb1296892ae3 Author: nagachika AuthorDate: 2025-03-29 16:49:59 +0900 Commit: nagachika CommitDate: 2025-03-29 16:49:59 +0900 merge revision(s) f69ad0e810e1fdc18dc12f77bbecfa49999ef3bf: [Backport #21094] [Bug #21094] Update nested module names when setting temporary name commit 770060f7662698ca74bc28428919a688b8fe06d2 Author: nagachika AuthorDate: 2025-03-29 15:25:02 +0900 Commit: nagachika CommitDate: 2025-03-29 15:32:49 +0900 merge revision(s) 1acfb29015dbc38fd345d8786aa78aad59f7dcd1: [Backport #21186] [Bug #21186] multibyte char literal should be a single letter word commit d2eda78e4091a99c1a387d43967af5794d8eac70 Author: nagachika AuthorDate: 2025-03-29 15:21:40 +0900 Commit: nagachika CommitDate: 2025-03-29 15:21:40 +0900 merge revision(s) 9459bedd84d479bb1d7d3d40bada1cecb4701c37: [Backport #19841] [Bug #19841] Refine error on marshaling recursive USERDEF commit c1319d7e406ddf3f0da487296f1c4c50d90496ad Author: David Rodríguez AuthorDate: 2025-03-21 02:19:58 +0900 Commit: Hiroshi SHIBATA CommitDate: 2025-03-24 13:24:18 +0900 [rubygems/rubygems] Support git 2.49 One error message that we parse is now slightly different. https://github.com/rubygems/rubygems/commit/758528791d commit f85e5e01bafeca387e833b9d79cab43a8b22aa3d Author: nagachika AuthorDate: 2025-03-16 20:10:00 +0900 Commit: nagachika CommitDate: 2025-03-16 20:35:27 +0900 merge revision(s) f423f6e10c0c226dfed98e7cb7a5d489191dfa35: [Backport #21131] Ensure IO.copy_stream buffer is an independent string Otherwise, changes to the buffer by the destination write method could result in data changing for supposedly independent strings. Fixes [Bug #21131] commit 2b2ab1a67c236eb0c47e63e8adcf877b0d20a38c Author: nagachika AuthorDate: 2025-03-16 18:52:56 +0900 Commit: nagachika CommitDate: 2025-03-16 18:52:56 +0900 merge revision(s) 08b3a45bc97c835b4677bf76dbce68fd51d81897: [Backport #21180] Push a real iseq in rb_vm_push_frame_fname() Previously, vm_make_env_each() (used during proc creation and for the debug inspector C API) picked up the non-GC-allocated iseq that rb_vm_push_frame_fname() creates, which led to a SEGV when the GC tried to mark the non GC object. Put a real iseq imemo instead. Speed should be about the same since the old code also did a imemo allocation and a malloc allocation. Real iseq allows ironing out the special-casing of dummy frames in rb_execution_context_mark() and rb_execution_context_update(). A check is added to RubyVM::ISeq#eval, though, to stop attempts to run dummy iseqs. [Bug #21180] Co-authored-by: Aaron Patterson commit d213eb7f453fa0bd6c476826c450d9726c3c8b15 Author: nagachika AuthorDate: 2025-03-16 18:46:04 +0900 Commit: nagachika CommitDate: 2025-03-16 18:46:29 +0900 merge revision(s) 3f07bc76ff6a11232d9f18e5eaa31835c195e8f0, 34098b669c0cbc024cd08e686891f1dfe0a10aaf: [Backport #21144] [Bug #21144] Win32: Use Windows time zone ID if TZ is not set If the TZ environment variable is not set, the time zone names retrieved from the system are localized for UI display and may vary across editions and language packs for the same time zone. Use the time zone IDs that are invariant across environments instead. [Bug #21144] Win32: Convert the time zone name to the current locale The Windows time zone IDs provided by Microsoft as of 24H1 are ASCII only all, but the API itself is not impossible to set non-ASCII key name. Prefer the current locale encoding for now until we move to UTF-8 including environment variables and command line arguments. commit 726bff43b462d2a1b0bc93299cf031202f7fe7a1 Author: nagachika AuthorDate: 2025-03-16 18:02:45 +0900 Commit: nagachika CommitDate: 2025-03-16 18:02:45 +0900 merge revision(s) c224ca4feaff20cab03d76439bcbfb35d4e2f6b1: [Backport #21172] Fix a race condition with interned strings sweeping. [Bug #21172] This fixes a rare CI failure. The timeline of the race condition is: - A `"foo" oid=1` string is interned. - `"foo" oid=1` is no longer referenced and will be swept in the future. - Another `"foo" oid=2` string is interned. - `register_fstring` finds `"foo" oid=1`, but since it is about to be swept, removes it from `fstring_table` and insert `"foo" oid=2` instead. - `"foo" oid=1` is swept, since it has the `RSTRING_FSTR` flag, a `st_delete` is issued in `fstring_table` which removes `"foo" oid=2`. I don't know how to reproduce this bug consistently in a single test case. commit 1d3c19871d7a0d05a0f0a80e78cfad843b7ef324 Author: nagachika AuthorDate: 2025-03-16 15:39:32 +0900 Commit: nagachika CommitDate: 2025-03-16 15:39:32 +0900 merge revision(s) 931ac960b6d11937364b6c4e847fdd575ee67980: [Backport #21159] [Bug #21159] module names should not be modifiable commit da86a9959b4c5bbdefb6fd1000a0251a151ffbc1 Author: nagachika AuthorDate: 2025-03-16 15:25:20 +0900 Commit: nagachika CommitDate: 2025-03-16 15:25:20 +0900 merge revision(s) 2b6fc9ea7212543a1be26768403f59c7a759b5ea: [Backport #21092] [Bug #21092] Fallback variables after execonf has done When reading from a dummy makefile, the global variables initialized in `init_mkmf` may not be overridden. commit ac3f355fb33f4ce41df864f2084028610b7b38d1 Author: nagachika AuthorDate: 2025-03-16 13:10:13 +0900 Commit: nagachika CommitDate: 2025-03-16 13:10:13 +0900 Silently ignore keyword args for attr-asign method to cease segmentation fault. commit e860cb2267cd17aef9a5e8e977d03410c213d6a2 Author: nagachika AuthorDate: 2025-03-08 18:21:16 +0900 Commit: nagachika CommitDate: 2025-03-08 18:21:16 +0900 merge revision(s) 91a10c07579f282a94e4b5830feaeca87f9a7dd3: [Backport #21112] Fix a typo in WeakKeyMap argument error [Bug #21112] commit fff5baf200572762a60c624bc7bea866992c2f30 Author: nagachika AuthorDate: 2025-03-08 18:19:14 +0900 Commit: nagachika CommitDate: 2025-03-08 18:19:14 +0900 merge revision(s) 46b544c54955348ef1ea9692b837b061f59f91cd, d3abee739f4feb91bb9aaae33877d70c8c576db0: [Backport #21095] Prefer `uname -n` over `hostname`. (#12647) Add fallback for `hostname` if `uname` isn't available. (#12655) commit 54dd27d89d2e6814114f1aff18836a987d5a4ab1 Author: nagachika AuthorDate: 2025-03-08 17:26:28 +0900 Commit: nagachika CommitDate: 2025-03-08 17:26:28 +0900 merge revision(s) d4a1a2780c39bc648496ac92fc6e6ce2eb38ab47: [Backport #21032] rb_feature_p: skip `get_expanded_load_path` for absolute paths Ref: https://github.com/fxn/zeitwerk/pull/308 ```ruby require 'benchmark' $LOAD_PATH << 'relative-path' autoload :FOO, '/tmp/foo.rb' puts Benchmark.realtime { 500_000.times do Object.autoload?(:FOO) end } ``` The above script takes 2.5 seconds on `master`, and only 50ms on this branch. When we're looking for a feature with an absolute path, we don't need to call the expensive `get_expanded_load_path`. commit 8274b8193e0a047d1edfff603dd2436276f906c4 Author: nagachika AuthorDate: 2025-03-08 17:23:15 +0900 Commit: nagachika CommitDate: 2025-03-08 17:23:15 +0900 merge revision(s) f7059af50a31a4d27a04ace0beadb60616f3f971: [Backport #21046] Use no-inline version `rb_current_ec` on Arm64 The TLS across .so issue seems related to Arm64, but not Darwin. commit 56ba9041d9e338359b32ba0bfb3d816d57dc9d39 Author: nagachika AuthorDate: 2025-03-08 17:03:20 +0900 Commit: nagachika CommitDate: 2025-03-08 17:03:20 +0900 merge revision(s) ae6bd3b49ba252985b92416c24102ede3c0aac9b, 966458199d870b88b42898d4a063b487c1ef6b00, 966458199d870b88b42898d4a063b487c1ef6b00: [Backport #20951] [DOC] Tweak "Timezone Objects" - Make method descriptions plain pragraphs in each method. - Make "Argument" and "Returns" note-lists. [Bug #20951] [DOC] About UTC offset calculation after `utc_to_local` [Bug #20951] [DOC] About UTC offset calculation after `utc_to_local` commit ef523984f0c16ec3ec1ea3b5b74ed24e6b03d561 Author: John Hawthorn AuthorDate: 2025-03-06 07:21:48 +0900 Commit: nagachika CommitDate: 2025-03-08 16:43:58 +0900 Replace tombstone when converting AR to ST hash [Bug #21170] st_table reserves -1 as a special hash value to indicate that an entry has been deleted. So that that's a valid value to be returned from the hash function, do_hash replaces -1 with 0 so that it is not mistaken for the sentinel. Previously, when upgrading an AR table to an ST table, rb_st_add_direct_with_hash was used which did not perform the same conversion, this could lead to a hash in a broken state where one if its entries which was supposed to exist being marked as a tombstone. The hash could then become further corrupted when the ST table required resizing as the falsely tombstoned entry would be skipped but it would be counted in num entries, leading to an uninitialized entry at index 15. In most cases this will be really rare, unless using a very poorly implemented custom hash function. This also adds two debug assertions, one that st_add_direct_with_hash does not receive the reserved hash value, and a second in rebuild_table_with, which ensures that after we rebuild/compact a table it contains the expected number of elements. Co-authored-by: Alan Wu commit ecb9f7ef372c70c3e4fa81a5002533814a94aa86 Author: Hiroshi SHIBATA AuthorDate: 2025-02-26 18:14:54 +0900 Commit: nagachika CommitDate: 2025-03-08 16:27:22 +0900 Merge cgi-0.4.2 commit e58827163002e816e49ed18007f4fa3481102b08 Author: Hiroshi SHIBATA AuthorDate: 2025-02-26 18:14:16 +0900 Commit: nagachika CommitDate: 2025-03-08 16:27:22 +0900 Merge uri-0.13.2 commit 188ff4d4356b1a369e2204e5c45e1d168ffdf631 Author: Nobuyoshi Nakada AuthorDate: 2024-11-05 18:04:19 +0900 Commit: Takashi Kokubun CommitDate: 2025-03-06 09:09:35 +0900 Name dependency checks job And run on the latest ubuntu. commit 9472548aa1b8b82515602e543ec03872d0b139cb Author: Hiroshi SHIBATA AuthorDate: 2024-08-22 09:47:13 +0900 Commit: Takashi Kokubun CommitDate: 2025-03-06 09:09:35 +0900 automerge needs windows results commit c462deb48262eeb4dc08255d9b859eb73759eb95 Author: Takashi Kokubun AuthorDate: 2025-03-06 08:34:37 +0900 Commit: Takashi Kokubun CommitDate: 2025-03-06 08:36:55 +0900 Update actions/cache for ruby_3_3 commit 2e7f65acbd52e9da57e7b2c44597106ca70aebd8 Author: Hiroshi SHIBATA AuthorDate: 2025-02-28 15:54:12 +0900 Commit: Hiroshi SHIBATA CommitDate: 2025-02-28 16:43:01 +0900 Skip VS2022 17.13.x build see https://github.com/ruby/ruby/pull/12830 commit 5eb08338ca318c3ea2e367f3b00f0d1fb36270e2 Author: Takashi Kokubun AuthorDate: 2025-02-14 10:35:18 +0900 Commit: Takashi Kokubun CommitDate: 2025-02-14 10:35:44 +0900 Drop k0kubun from CODEOWNERS The maintainers have been shifted to newer versions. https://bugs.ruby-lang.org/issues/21136 commit f8b9e2c06f04ea3720d94b5268b6c62e30ad3b26 Author: nicholas a. evans AuthorDate: 2025-02-12 02:21:31 +0900 Commit: GitHub CommitDate: 2025-02-12 02:21:31 +0900 Bump net-imap to 0.4.19 for Ruby 3.3 (CVE-2025-25186) (#12732) This update addresses CVE-2025-25186 (GHSA-7fc5-f82f-cx69). commit 5b226fdb8df4a954476d8ee1b855539adaf82091 Author: Hiroshi SHIBATA AuthorDate: 2025-02-07 11:02:42 +0900 Commit: Takashi Kokubun CommitDate: 2025-02-11 01:29:08 +0900 Support `git ls-files ...`.split style for file list of gemspec commit 84b60a03cd908c1b2efdfee65d71ffc03418ea21 Author: Hiroshi SHIBATA AuthorDate: 2025-02-05 14:49:50 +0900 Commit: Takashi Kokubun CommitDate: 2025-02-11 01:29:08 +0900 Bump up net-smtp-0.5.1 commit da75893dbe4e6fbde84037a4e1730a95c685cdd9 Author: Hiroshi SHIBATA AuthorDate: 2025-02-05 14:58:35 +0900 Commit: Hiroshi SHIBATA CommitDate: 2025-02-06 09:49:44 +0900 Bump up actions/upload-artifact-4.4.1 commit be31f993d7fa0219d85f7b3c694d454da4ecc10b Author: Takashi Kokubun AuthorDate: 2025-01-15 16:22:35 +0900 Commit: Takashi Kokubun CommitDate: 2025-01-15 16:22:35 +0900 v3.3.7 commit b6affbca88f5e0a70bda784d5195be5f0408b5ba Author: Takashi Kokubun AuthorDate: 2025-01-15 14:25:34 +0900 Commit: Takashi Kokubun CommitDate: 2025-01-15 14:25:34 +0900 Skip an unstable test due to a Ractor assertion commit e9f479d8712f7ecd3802d4438cd44161088d9713 Author: Takashi Kokubun AuthorDate: 2025-01-15 14:16:36 +0900 Commit: Takashi Kokubun CommitDate: 2025-01-15 14:16:37 +0900 YJIT: Filter & calls from specialized C method codegen Evident with the crash reported in [Bug #20997], the C replacement codegen functions aren't authored to handle block arguments (nor should they because the extra code from the complexity defeats optimization). Filter sites with VM_CALL_ARGS_BLOCKARG. Co-Authored-By: Alan Wu commit 02bcfb42be7ca97fa40c6efa2f03ddff66c9257c Author: Takashi Kokubun AuthorDate: 2025-01-15 14:13:29 +0900 Commit: Takashi Kokubun CommitDate: 2025-01-15 14:13:29 +0900 merge revision(s) 04ec07794657cd2444ecb001a522b9df2db1b90a: [Backport #21038] Preserve `errno` in `rb_fiber_scheduler_unblock`. (#12576) [Bug #21038] Co-authored-by: Julian Scheid commit 7b9caf19ba480d168ef4c5e93690735240975c91 Author: Takashi Kokubun AuthorDate: 2025-01-15 11:00:02 +0900 Commit: Takashi Kokubun CommitDate: 2025-01-15 11:00:02 +0900 merge revision(s) b176d4f52e4af67654814dab3e9c5f4bf9170e54: [Backport #21008] [Bug #21008] Normalize before sum to float After switching to `Float`-mode when summing `Numeric` objects, normalization for `Float` is still needed. commit 12a0807965624a0be37dc79371a69b5d787cc8d1 Author: Takashi Kokubun AuthorDate: 2025-01-15 10:59:12 +0900 Commit: Takashi Kokubun CommitDate: 2025-01-15 10:59:12 +0900 merge revision(s) 8034e9c3d001ca3dff124ab42972684eac8af2ae: [Backport #20995] [Bug #20995] Protect `IO.popen` block from exiting by exception commit 0d6459249d13e247cd0eae28f59ef51b862bce80 Author: Takashi Kokubun AuthorDate: 2025-01-15 10:58:17 +0900 Commit: Takashi Kokubun CommitDate: 2025-01-15 10:58:17 +0900 merge revision(s) 19c39e4cfaa467e69b9848c9c5496d7f50d39c7f: [Backport #20984] [Bug #20984] ENV.inspect should be encoding aware commit 3a986b47cba80bdc081638d5f759a26c1beb8fad Author: Takashi Kokubun AuthorDate: 2025-01-15 10:56:25 +0900 Commit: Takashi Kokubun CommitDate: 2025-01-15 10:56:25 +0900 merge revision(s) e0d600ec190c64aff76cfcbd6009cffb927da166: [Backport #21012] Avoid opt_aset_with optimization inside multiple assignment Previously, since the opt_aset_with optimization was introduced, use of the opt_aset_with optimization inside multiple assignment would result in a segfault or incorrect instructions. Fixes [Bug #21012] Co-authored-by: Nobuyoshi Nakada commit 299455be9966c0a31dabe00014a4b8fae5093a7d Author: Takashi Kokubun AuthorDate: 2025-01-15 10:54:19 +0900 Commit: Takashi Kokubun CommitDate: 2025-01-15 10:54:19 +0900 merge revision(s) 92dd9734a967c20e628c8f77c5ce700058dcd58c: [Backport #20950] Fix use-after-free in ep in Proc#dup for ifunc procs [Bug #20950] ifunc proc has the ep allocated in the cfunc_proc_t which is the data of the TypedData object. If an ifunc proc is duplicated, the ep points to the ep of the source object. If the source object is freed, then the ep of the duplicated object now points to a freed memory region. If we try to use the ep we could crash. For example, the following script crashes: p = { a: 1 }.to_proc 100.times do p = p.dup GC.start p.call rescue ArgumentError end This commit changes ifunc proc to also duplicate the ep when it is duplicated. commit 00147cbab567b05b8a4137875bbda341ef704760 Author: Takashi Kokubun AuthorDate: 2025-01-15 10:53:38 +0900 Commit: Takashi Kokubun CommitDate: 2025-01-15 10:53:38 +0900 merge revision(s) e90b447655dd39ad1eb645cdaae450efd605db00: [Backport #20924] [Bug #20924] Fix reading with delimiter in wide character encodings commit 1b1c6e67588ef417847d36f4f4017bd18157a1d2 Author: Takashi Kokubun AuthorDate: 2025-01-15 10:52:11 +0900 Commit: Takashi Kokubun CommitDate: 2025-01-15 10:52:11 +0900 merge revision(s) f65a6c090c229de1665af49f2e51fc1d6397ab72: [Backport #20921] Fix use-after-free in constant cache [Bug #20921] When we create a cache entry for a constant, the following sequence of events could happen: - vm_track_constant_cache is called to insert a constant cache. - In vm_track_constant_cache, we first look up the ST table for the ID of the constant. Assume the ST table exists because another iseq also holds a cache entry for this ID. - We then insert into this ST table with the iseq_inline_constant_cache. - However, while inserting into this ST table, it allocates memory, which could trigger a GC. Assume that it does trigger a GC. - The GC frees the one and only other iseq that holds a cache entry for this ID. - In remove_from_constant_cache, it will appear that the ST table is now empty because there are no more iseq with cache entries for this ID, so we free the ST table. - We complete GC and continue our st_insert. However, this ST table has been freed so we now have a use-after-free. This issue is very hard to reproduce, because it requires that the GC runs at a very specific time. However, we can make it show up by applying this patch which runs GC right before the st_insert to mimic the st_insert triggering a GC: diff --git a/vm_insnhelper.c b/vm_insnhelper.c index 3cb23f06f0..a93998136a 100644 --- a/vm_insnhelper.c +++ b/vm_insnhelper.c @@ -6338,6 +6338,10 @@ vm_track_constant_cache(ID id, void *ic) rb_id_table_insert(const_cache, id, (VALUE)ics); } + if (id == rb_intern("MyConstant")) rb_gc(); + st_insert(ics, (st_data_t) ic, (st_data_t) Qtrue); } And if we run this script: Object.const_set("MyConstant", "Hello!") my_proc = eval("-> { MyConstant }") my_proc.call my_proc = eval("-> { MyConstant }") my_proc.call We can see that ASAN outputs a use-after-free error: ==36540==ERROR: AddressSanitizer: heap-use-after-free on address 0x606000049528 at pc 0x000102f3ceac bp 0x00016d607a70 sp 0x00016d607a68 READ of size 8 at 0x606000049528 thread T0 #0 0x102f3cea8 in do_hash st.c:321 #1 0x102f3ddd0 in rb_st_insert st.c:1132 #2 0x103140700 in vm_track_constant_cache vm_insnhelper.c:6345 #3 0x1030b91d8 in vm_ic_track_const_chain vm_insnhelper.c:6356 #4 0x1030b8cf8 in rb_vm_opt_getconstant_path vm_insnhelper.c:6424 #5 0x1030bc1e0 in vm_exec_core insns.def:263 #6 0x1030b55fc in rb_vm_exec vm.c:2585 #7 0x1030fe0ac in rb_iseq_eval_main vm.c:2851 #8 0x102a82588 in rb_ec_exec_node eval.c:281 #9 0x102a81fe0 in ruby_run_node eval.c:319 #10 0x1027f3db4 in rb_main main.c:43 #11 0x1027f3bd4 in main main.c:68 #12 0x183900270 () 0x606000049528 is located 8 bytes inside of 56-byte region [0x606000049520,0x606000049558) freed by thread T0 here: #0 0x104174d40 in free+0x98 (libclang_rt.asan_osx_dynamic.dylib:arm64e+0x54d40) #1 0x102ada89c in rb_gc_impl_free default.c:8183 #2 0x102ada7dc in ruby_sized_xfree gc.c:4507 #3 0x102ac4d34 in ruby_xfree gc.c:4518 #4 0x102f3cb34 in rb_st_free_table st.c:663 #5 0x102bd52d8 in remove_from_constant_cache iseq.c:119 #6 0x102bbe2cc in iseq_clear_ic_references iseq.c:153 #7 0x102bbd2a0 in rb_iseq_free iseq.c:166 #8 0x102b32ed0 in rb_imemo_free imemo.c:564 #9 0x102ac4b44 in rb_gc_obj_free gc.c:1407 #10 0x102af4290 in gc_sweep_plane default.c:3546 #11 0x102af3bdc in gc_sweep_page default.c:3634 #12 0x102aeb140 in gc_sweep_step default.c:3906 #13 0x102aeadf0 in gc_sweep_rest default.c:3978 #14 0x102ae4714 in gc_sweep default.c:4155 #15 0x102af8474 in gc_start default.c:6484 #16 0x102afbe30 in garbage_collect default.c:6363 #17 0x102ad37f0 in rb_gc_impl_start default.c:6816 #18 0x102ad3634 in rb_gc gc.c:3624 #19 0x1031406ec in vm_track_constant_cache vm_insnhelper.c:6342 #20 0x1030b91d8 in vm_ic_track_const_chain vm_insnhelper.c:6356 #21 0x1030b8cf8 in rb_vm_opt_getconstant_path vm_insnhelper.c:6424 #22 0x1030bc1e0 in vm_exec_core insns.def:263 #23 0x1030b55fc in rb_vm_exec vm.c:2585 #24 0x1030fe0ac in rb_iseq_eval_main vm.c:2851 #25 0x102a82588 in rb_ec_exec_node eval.c:281 #26 0x102a81fe0 in ruby_run_node eval.c:319 #27 0x1027f3db4 in rb_main main.c:43 #28 0x1027f3bd4 in main main.c:68 #29 0x183900270 () previously allocated by thread T0 here: #0 0x104174c04 in malloc+0x94 (libclang_rt.asan_osx_dynamic.dylib:arm64e+0x54c04) #1 0x102ada0ec in rb_gc_impl_malloc default.c:8198 #2 0x102acee44 in ruby_xmalloc gc.c:4438 #3 0x102f3c85c in rb_st_init_table_with_size st.c:571 #4 0x102f3c900 in rb_st_init_table st.c:600 #5 0x102f3c920 in rb_st_init_numtable st.c:608 #6 0x103140698 in vm_track_constant_cache vm_insnhelper.c:6337 #7 0x1030b91d8 in vm_ic_track_const_chain vm_insnhelper.c:6356 #8 0x1030b8cf8 in rb_vm_opt_getconstant_path vm_insnhelper.c:6424 #9 0x1030bc1e0 in vm_exec_core insns.def:263 #10 0x1030b55fc in rb_vm_exec vm.c:2585 #11 0x1030fe0ac in rb_iseq_eval_main vm.c:2851 #12 0x102a82588 in rb_ec_exec_node eval.c:281 #13 0x102a81fe0 in ruby_run_node eval.c:319 #14 0x1027f3db4 in rb_main main.c:43 #15 0x1027f3bd4 in main main.c:68 #16 0x183900270 () This commit fixes this bug by adding a inserting_constant_cache_id field to the VM, which stores the ID that is currently being inserted and, in remove_from_constant_cache, we don't free the ST table for ID equal to this one. Co-Authored-By: Alan Wu commit 745fe4cf7e0c297879b46045a4838b3e5e2dfeb9 Author: Takashi Kokubun AuthorDate: 2025-01-15 10:51:27 +0900 Commit: Takashi Kokubun CommitDate: 2025-01-15 10:51:27 +0900 merge revision(s) 660b995365f719fa59ed6f2809bb1527e6470d14: [Backport #20915] [Bug #20915] Fix SEGV with `TracePoint#parameters` and aliased C method The following snippet results with a SEGV: ```ruby C = Class.new do alias_method :new_to_s, :to_s end TracePoint.new(:c_call, &:parameters).enable { C.new.new_to_s } ``` at MRI 3.3.6 and ruby 3.4.0dev The root cause of the issue lies in the `rb_tracearg_parameters` function within the `RUBY_EVENT_C_RETURN` branch. Specifically, when the invoked method is an alias for a C function, `rb_method_entry_without_refinements(..., trace_arg->called_id, ...)` may return NULL. In that case we can fallback to `trace_arg->id`. commit 1e48631e0f318a3b73cd39bdbda4619017383aac Author: Takashi Kokubun AuthorDate: 2025-01-15 10:50:24 +0900 Commit: Takashi Kokubun CommitDate: 2025-01-15 10:50:24 +0900 merge revision(s) 02b70256b5171d4b85ea7eeab836d3d7cfb3dbfc, 6b4f8945d600168bf530d21395da8293fbd5e8ba: [Backport #20909] Check negative integer underflow Many of Oniguruma functions need valid encoding strings commit 8506fdfb4aca5262940b9c49827c2a839f6bb1fe Author: Takashi Kokubun AuthorDate: 2025-01-15 10:48:57 +0900 Commit: Takashi Kokubun CommitDate: 2025-01-15 10:48:57 +0900 merge revision(s) 3b7892b6e4d1a1a5d6019987f9b46ed443dd104f: [Backport #20871] Fix a bug in rb_include_module that stops nested inclusion into module subclasses This bug was present since the code was originally added by me in 3556a834a2847e52162d1d3302d4c64390df1694. Fixes [Bug #20871] commit f19831a15d680fd995ceaecad1157282be7182dc Author: Takashi Kokubun AuthorDate: 2025-01-15 10:47:41 +0900 Commit: Takashi Kokubun CommitDate: 2025-01-15 10:47:41 +0900 merge revision(s) a8c2d5e7bee5fad0965baeb58d312ddc5932ec26: [Backport #20907] Ensure fiber scheduler re-acquires mutex when interrupted from sleep. (#12158) [Bug #20907] commit 1ec258ab7002210670171f3f2f0c4b39657e24a4 Author: Takashi Kokubun AuthorDate: 2025-01-15 10:42:54 +0900 Commit: Takashi Kokubun CommitDate: 2025-01-15 10:42:54 +0900 merge revision(s) d71be7274bd2623bb521be72c245c08fc38d6ae4: [Backport #20873] [Bug #20873] Consider `-FIXNUM_MIN` overflow `-FIXNUM_MIN` is usually greater than `FIXNUM_MAX` on platforms using two's complement representation. commit 42f043c1893b320b9d2a38ec3b1065dee71ce863 Author: Takashi Kokubun AuthorDate: 2025-01-15 10:40:39 +0900 Commit: Takashi Kokubun CommitDate: 2025-01-15 10:40:39 +0900 merge revision(s) 56ecc243e230e8e99761ec0ffc5116601f094bb0: [Backport #20868] [Bug #20868] Fix Method#hash to not change after compaction The hash value of a Method must remain constant after a compaction, otherwise it may not work as the key in a hash table. For example: def a; end # Need this method here because otherwise the iseq may be on the C stack # which would get pinned and not move during compaction def get_hash method(:a).hash end puts get_hash # => 2993401401091578131 GC.verify_compaction_references(expand_heap: true, toward: :empty) puts get_hash # => -2162775864511574135 commit 233014639793cb6c8650a9b17d37bc09c662d430 Author: Takashi Kokubun AuthorDate: 2025-01-15 10:38:34 +0900 Commit: Takashi Kokubun CommitDate: 2025-01-15 10:38:34 +0900 merge revision(s) 773d140f65c1c8b726e107915bc003c186f38677: [Backport #20787] [Bug #20787] Check the separator in `IO#readline` as well as 3.2 commit 732ee20a02bcfd92a473a7841f374ee9b8a7bbb0 Author: Hiroshi SHIBATA AuthorDate: 2024-12-03 10:28:04 +0900 Commit: Hiroshi SHIBATA CommitDate: 2024-12-03 11:08:37 +0900 Bump up actions/checkout-4.2.2 commit 7ff601aea00265f12a4cef1fd6c6321d6215d844 Author: Hiroshi SHIBATA AuthorDate: 2024-12-03 10:01:10 +0900 Commit: Hiroshi SHIBATA CommitDate: 2024-12-03 11:08:37 +0900 Lock json-schema-5.1.0 for using pure ruby version commit c53d12ee708662ac4b231178b08bd8a75f21ffeb Author: Hiroshi SHIBATA AuthorDate: 2024-11-19 16:39:59 +0900 Commit: Hiroshi SHIBATA CommitDate: 2024-11-20 10:18:27 +0900 Revert "Skip tests that suddenly started failing for MinGW" This reverts commit f72eb702f29574b85889d3ea6447efa29c8a8789. commit da008169578b389039845c4f1008b03da249964f Author: Nobuyoshi Nakada AuthorDate: 2024-11-17 22:49:16 +0900 Commit: Hiroshi SHIBATA CommitDate: 2024-11-20 10:18:27 +0900 Win32: Expose wchar main routine only Warned if both of `main` and `wmain` are exposed: ``` LINK : warning LNK4067: ambiguous entry point; selected 'mainCRTStartup' ``` commit 7e2789415b1189072b79a1144f0aa871216e6fd0 Author: Nobuyoshi Nakada AuthorDate: 2024-11-10 21:31:43 +0900 Commit: Hiroshi SHIBATA CommitDate: 2024-11-20 10:18:27 +0900 Make `MUNICODE_FLAG` simply expanded It is not expected that `target_os` will change going forward. commit b4afc2b25fbe2c4112b273a5aab51f8371a4feb6 Author: Daisuke Fujimura (fd0) AuthorDate: 2024-11-06 21:28:19 +0900 Commit: Hiroshi SHIBATA CommitDate: 2024-11-20 10:18:27 +0900 `EXE_LDFLAGS` uses the same `MUNICODE_FLAG` commit b7475e2ac326701776f34d4f2cfeddb7a5dca428 Author: Daisuke Fujimura (fd0) AuthorDate: 2024-11-06 10:01:35 +0900 Commit: Hiroshi SHIBATA CommitDate: 2024-11-20 10:18:27 +0900 `-municode` is available for MinGW-w64 targets only commit b3a1fc146c9793c31ec59bb75f30c368dcc94aa7 Author: Nobuyoshi Nakada AuthorDate: 2024-11-04 09:39:15 +0900 Commit: Hiroshi SHIBATA CommitDate: 2024-11-20 10:18:27 +0900 Use wide character startup Mingw crt-git 12.0.0.r369.g0d4221712-1 now prohibits "command line contains characters that are not supported in the active code page". https://sourceforge.net/p/mingw-w64/mingw-w64/ci/0d42217123d3aec0341b79f6d959c76e09648a1e/ Already Ruby builds `argv` in `rb_w32_sysinit`, instead of mswin- or mingw-made `argv`. Just bypass the conversion in mingw crt. commit 792826d5f4b77adf571d20b8752f5d93a1848092 Author: Nobuyoshi Nakada AuthorDate: 2024-11-17 19:56:02 +0900 Commit: Hiroshi SHIBATA CommitDate: 2024-11-20 10:18:27 +0900 Make `rb_ec_set_vm_stack` conformant to the C++11 requirement Https://learn.microsoft.com/en-us/cpp/build/reference/zc-inline-remove-unreferenced-comdat?view=msvc-140 > If `/Zc:inline` is specified, the compiler enforces the C++11 > requirement that all functions declared inline must have a definition > available in the same translation unit if they're used. commit d44061b91986a225dd4a9d0337853a45de9eef48 Author: Nobuyoshi Nakada AuthorDate: 2024-11-17 19:29:16 +0900 Commit: Hiroshi SHIBATA CommitDate: 2024-11-20 10:18:27 +0900 Win32: Remove unreferenced COMDAT from object files Windows 11 SDK Version 10.0.26100.0 introduced a new internal inline function in ucrt/corecrt_math.h. Even it appears in object files and will be included in the DEF file, it will be removed from the DLL and result in a linker error. commit 5232e3ce3cdd69f9afaf5d34370f6ef3c84e4930 Author: MSP-Greg AuthorDate: 2024-06-21 09:33:06 +0900 Commit: Hiroshi SHIBATA CommitDate: 2024-11-20 10:18:27 +0900 [ruby/net-http] test_https.rb - fix test_session_reuse_but_expire https://github.com/ruby/net-http/commit/5544243c41 commit c78721f718d1004182b36a6610d32b1a158808be Author: Job Snijders AuthorDate: 2024-03-25 21:20:13 +0900 Commit: Hiroshi SHIBATA CommitDate: 2024-11-20 10:18:27 +0900 [ruby/openssl] Only CSR version 1 (encoded as 0) is allowed by PKIX standards RFC 2986, section 4.1 only defines version 1 for CSRs. This version is encoded as a 0. Starting with OpenSSL 3.3, setting the CSR version to anything but 1 fails. Do not attempt to generate a CSR with invalid version (which now fails) and invalidate the CSR in test_sign_and_verify_rsa_sha1 by changing its subject rather than using an invalid version. This commit fixes the following error. ``` 2) Error: test_version(OpenSSL::TestX509Request): OpenSSL::X509::RequestError: X509_REQ_set_version: passed invalid argument /home/runner/work/openssl/openssl/test/openssl/test_x509req.rb:18:in `version=' /home/runner/work/openssl/openssl/test/openssl/test_x509req.rb:18:in `issue_csr' /home/runner/work/openssl/openssl/test/openssl/test_x509req.rb:43:in `test_version' 40: req = OpenSSL::X509::Request.new(req.to_der) 41: assert_equal(0, req.version) 42: => 43: req = issue_csr(1, @dn, @rsa1024, OpenSSL::Digest.new('SHA256')) 44: assert_equal(1, req.version) 45: req = OpenSSL::X509::Request.new(req.to_der) 46: assert_equal(1, req.version) ``` https://github.com/ruby/openssl/commit/c06fdeb091 commit 068fb26c0862e10f892e89ad7b6bb31e548fde0c Author: Hiroshi SHIBATA AuthorDate: 2024-11-19 15:42:45 +0900 Commit: Hiroshi SHIBATA CommitDate: 2024-11-20 10:18:27 +0900 Lock sinatra-4.0 commit a97621ef3c7e026651d93460bbf04d3008c5676b Author: Yuta Saito AuthorDate: 2024-11-16 07:05:28 +0900 Commit: GitHub CommitDate: 2024-11-16 07:05:28 +0900 wasm: align fiber stack pointer to 16 bytes (#12101) wasm: align fiber stack pointer to 16 bytes In WebAssembly C ABI, the linear stack pointer must be always aligned to 16 bytes like other archs. The misaligned stack pointer causes some weird memory corruption since compiler assumes the aligned stack pointer. commit a24570a62a584478a7dde5dd716b5c88fe86e9e5 Author: Jean byroot Boussier AuthorDate: 2024-11-13 04:20:36 +0900 Commit: GitHub CommitDate: 2024-11-13 04:20:36 +0900 ObjectSpace.dump: handle Module#set_temporary_name (#12068) ObjectSpace.dump: handle Module#set_temporary_name [Bug #20892] Until the introduction of that method, it was impossible for a Module name not to be valid JSON, hence it wasn't going through the slower escaping function. This assumption no longer hold. Co-authored-by: Jean Boussier commit f4258aaed02ee7be761f2499b0b6243a8f37b7cb Author: John Hawthorn AuthorDate: 2024-11-13 02:04:21 +0900 Commit: GitHub CommitDate: 2024-11-13 02:04:21 +0900 [Bug #20886] Avoid double-free in regex timeout after stack_double (#12063) Fix regex timeout double-free after stack_double As of 10574857ce167869524b97ee862b610928f6272f, it's possible to crash on a double free due to `stk_alloc` AKA `msa->stack_p` being freed twice, once at the end of match_at and a second time in `FREE_MATCH_ARG` in the parent caller. Fixes [Bug #20886] commit a51a6bf6926241704593b9439e91c06ee6f3ee61 Author: John Hawthorn AuthorDate: 2024-11-09 18:00:13 +0900 Commit: GitHub CommitDate: 2024-11-09 18:00:13 +0900 [Bug #20883] Fix coderange for sprintf on binary strings (#12040) Fix update_coderange for binary strings Although a binary (aka ASCII-8BIT) string will never have a broken coderange, it still has to differentiate between "valid" and "7bit". On Ruby 3.4/trunk this problem is masked because we now clear the coderange more agressively in rb_str_resize, and we happened to always be strinking this string, but we should not assume that. On Ruby 3.3 this created strings where `ascii_only?` was true in cases it shouldn't be as well as other problems. Fixes [Bug #20883] Co-authored-by: Daniel Colson Co-authored-by: Matthew Draper commit 75015d4c1f6965b5e85e96fb309f1f2129f933c0 Author: Takashi Kokubun AuthorDate: 2024-11-05 09:49:11 +0900 Commit: Takashi Kokubun CommitDate: 2024-11-05 09:49:11 +0900 v3.3.6 commit f72eb702f29574b85889d3ea6447efa29c8a8789 Author: Takashi Kokubun AuthorDate: 2024-11-05 09:00:11 +0900 Commit: Takashi Kokubun CommitDate: 2024-11-05 09:00:11 +0900 Skip tests that suddenly started failing for MinGW These test failures first appeared on irrelevant changes. It probably came from changes in GitHub Actions instead of CRuby's. Until we figure out how to fix these tests, let's skip them to make the CI usable. commit 7237ded95f3ad624edc122b14d0276daf554a96c Author: Takashi Kokubun AuthorDate: 2024-11-05 07:52:42 +0900 Commit: Takashi Kokubun CommitDate: 2024-11-05 07:52:43 +0900 macos-12 is deprecated and fails on Mondays https://github.com/actions/runner-images/issues/10721 commit 6db39f4677ff50aacfe54bd9dda052c09e1c6ab0 Author: Takashi Kokubun AuthorDate: 2024-11-05 07:43:39 +0900 Commit: Takashi Kokubun CommitDate: 2024-11-05 07:43:39 +0900 merge revision(s) 29c480dd6fca993590c82078ba797e2c4e876ac7: [Backport #20853] [Bug #20853] Fix Proc#hash to not change after compaction The hash value of a Proc must remain constant after a compaction, otherwise it may not work as the key in a hash table. commit edeb0319f7a95dfe3f9b895bcf32371dd8514726 Author: Takashi Kokubun AuthorDate: 2024-11-05 07:42:47 +0900 Commit: Takashi Kokubun CommitDate: 2024-11-05 07:42:47 +0900 merge revision(s) 6118e8a47394409b53164b60e79fadf348b97db3: [Backport #20716] Fix method caching bug when including/prepend module A that prepends module B Fix by always adding the generated iclass to the subclasses list, otherwise the method cache for the iclass is not cleared when the method in the module is overwritten. Fixes [Bug #20716] commit 5ce0ba0d415deb99527c409cc5f1df16ce02ef3e Author: Takashi Kokubun AuthorDate: 2024-11-05 07:39:22 +0900 Commit: Takashi Kokubun CommitDate: 2024-11-05 07:39:22 +0900 merge revision(s) 35e124832e29b65c84d4e0e4e434616859f9bdf5: [Backport #20755] [Bug #20755] Frozen string should not be writable via IO::Buffer commit 12ea98e8c8af0ed6778aad26e7ec5f95e2c239e5 Author: Takashi Kokubun AuthorDate: 2024-11-05 07:38:18 +0900 Commit: Takashi Kokubun CommitDate: 2024-11-05 07:38:18 +0900 merge revision(s) 637067440f74043c6d79fc649ab8acf1afea25a5: [Backport #20752] [Bug #20752] Slice of readonly `IO::Buffer` also should be readonly commit 34a0f41d0aaff190f1647a6fa0e905690d0eff98 Author: Takashi Kokubun AuthorDate: 2024-11-05 07:37:14 +0900 Commit: Takashi Kokubun CommitDate: 2024-11-05 07:37:14 +0900 merge revision(s) c1862cbb89a6bf42dcd07d92fe4f4bfeebca5775: [Backport #20719] [Bug #20719] `Float` argument must be ASCII compatible commit 2b713dcb89c620daa55d672d2933ffde333ca5de Author: Takashi Kokubun AuthorDate: 2024-11-05 07:36:36 +0900 Commit: Takashi Kokubun CommitDate: 2024-11-05 07:36:36 +0900 merge revision(s) d33e3d47b84a73b38644f2a3d41881ce9be6ef18: [Backport #20704] [Bug #20704] Win32: Fix chdir to non-ASCII path On Windows, `chdir` in compilers' runtime libraries uses the active code page, but command line arguments in ruby are always UTF-8, since commit:33ea2646b98adb49ae2e1781753bf22d33729ac0. commit e7c939aea1034a463226635e11117ade42cba4e4 Author: Takashi Kokubun AuthorDate: 2024-11-05 07:29:25 +0900 Commit: Takashi Kokubun CommitDate: 2024-11-05 07:29:25 +0900 merge revision(s) 76ea5cde2a0f4834a5228104249b6b3346ddfc94: [Backport #20777] Refactor RUBY_DESCRIPTION assertions in test_rubyoptions commit 7446f7cdd103b129b8b750f577efd29e069176c0 Author: Jonathan Calvert AuthorDate: 2024-09-07 12:19:47 +0900 Commit: Takashi Kokubun CommitDate: 2024-11-05 07:26:25 +0900 merge revision(s) 0d16c36d0ab2afa2ec79b72b229e69c141ebdaba: [Backport #13831] [win32/registry] Fallback to UTF-8 for unknown codepages There are some codepages like cp708 for which no ruby encoding exists: $ ruby -e "Encoding.find('cp708')" Traceback (most recent call last): 1: from -e:1:in `
' -e:1:in `find': unknown encoding name - cp708 (ArgumentError) win32/registry uses ENCODING to transcode error messages and expand environment variables from UTF-16LE, so using UTF-8 seems like the best choice and is better than a hard failure. This should resolve [Bug #13831] commit 6b3a0b4ffd12cd7f80be224efa8744534fcf2b93 Author: Alex Myers AuthorDate: 2024-11-02 00:42:18 +0900 Commit: GitHub CommitDate: 2024-11-02 00:42:18 +0900 Bump REXML to 3.3.9 for Ruby 3.3 (#11972) commit c4b6ce36758fbc8d851b8b6563d0cf64cf2417db Author: Hiroshi SHIBATA AuthorDate: 2024-10-18 11:12:25 +0900 Commit: Takashi Kokubun CommitDate: 2024-10-22 00:41:50 +0900 Merge syntax-suggest-2.0.1 commit 494fcc507b3bc218beb6638d33476b647d55969e Author: Hiroshi SHIBATA AuthorDate: 2024-10-17 16:12:09 +0900 Commit: Takashi Kokubun CommitDate: 2024-10-18 00:55:01 +0900 Merge RubyGems-3.5.22 and Bundler-2.5.22 commit d03e4228aaeb1bdd3432119e683aa259b028c5b2 Author: Hiroshi SHIBATA AuthorDate: 2024-10-17 16:11:25 +0900 Commit: Takashi Kokubun CommitDate: 2024-10-18 00:55:01 +0900 Merge RubyGems-3.5.21 and Bundler-2.5.21 commit af7656869ee714a7124c1c655bc905e456770bd2 Author: Nobuyoshi Nakada AuthorDate: 2024-09-09 17:25:22 +0900 Commit: Takashi Kokubun CommitDate: 2024-10-01 01:16:44 +0900 Run just bignum related tests when gmp enabled commit 4608ef8d7b0e22d690b73dabc032e9dd43e9a446 Author: Hiroshi SHIBATA AuthorDate: 2024-09-30 12:03:02 +0900 Commit: Takashi Kokubun CommitDate: 2024-10-01 01:16:44 +0900 -l option of 7z is unknown switch with the `ubuntu-latest`. https://github.com/ruby/actions/actions/runs/11095032727/job/30823174026#step:3:349 commit 77fb1bf434d7be9cf5d892404b04b20c18fa6f06 Author: Hiroshi SHIBATA AuthorDate: 2024-09-25 16:54:40 +0900 Commit: Takashi Kokubun CommitDate: 2024-09-26 02:56:17 +0900 Merge RubyGems-3.5.20 and Bundler-2.5.20 commit 3894841182c32de231b3998502bf1a9dba7cdb4f Author: Hiroshi SHIBATA AuthorDate: 2024-09-25 16:54:19 +0900 Commit: Takashi Kokubun CommitDate: 2024-09-26 02:56:17 +0900 Merge RubyGems-3.5.19 and Bundler-2.5.19 commit ef3c4a7aa7c0a79a00f4daa50e0be1184d9fe536 Author: Hiroshi SHIBATA AuthorDate: 2024-09-25 16:53:56 +0900 Commit: Takashi Kokubun CommitDate: 2024-09-26 02:56:17 +0900 Merge RubyGems-3.5.18 and Bundler-2.5.18 commit 95f72a4a32396cae7475b39d7739fb534242b625 Author: Hiroshi SHIBATA AuthorDate: 2024-09-25 16:53:34 +0900 Commit: Takashi Kokubun CommitDate: 2024-09-26 02:56:17 +0900 Merge RubyGems-3.5.17 and Bundler-2.5.17 commit d8966416d010719ef8f1689137da31aa75e71198 Author: Nobuyoshi Nakada AuthorDate: 2024-09-25 02:50:33 +0900 Commit: GitHub CommitDate: 2024-09-25 02:50:33 +0900 Use `PRIuSIZE` instead of `%zu` for `size_t` (#9359) Co-authored-by: Takashi Kokubun commit ec04de7512d512a2bcc623a72a4f17f43a01a5bf Author: Takashi Kokubun AuthorDate: 2024-09-24 00:47:15 +0900 Commit: Takashi Kokubun CommitDate: 2024-09-24 01:25:10 +0900 Bump debug.gem to 1.9.2 commit 5b6009870dff883a8e71a05e60f175cea1d00d55 Author: KJ Tsanaktsidis AuthorDate: 2024-09-13 16:40:30 +0900 Commit: Takashi Kokubun CommitDate: 2024-09-24 01:25:10 +0900 Ensure fiber scheduler is woken up when close interrupts read If one thread is reading and another closes that socket, the close blocks waiting for the read to abort cleanly. This ensures that Ruby is totally done with the file descriptor _BEFORE_ we tell the OS to close and potentially re-use it. When the read is correctly terminated, the close should be unblocked. That currently works if closing is happening on a thread, but if it's happening on a fiber with a fiber scheduler, it does NOT work. This patch ensures that if the close happened in a fiber scheduled thread, that the scheduler is notified that the fiber is unblocked. [Bug #20723] commit 4e59e7d35fbd6ff87f63cd0aa5d6a2f923323fee Author: Hiroshi SHIBATA AuthorDate: 2024-09-17 09:28:08 +0900 Commit: GitHub CommitDate: 2024-09-17 09:28:08 +0900 [Bug #20737] Do not warn default gems to be promoted in Ruby 3.5 (#11613) commit 55ddfd58dd6e67e88cf9a3e55bf99550affe8b3f Author: Jonathan Calvert AuthorDate: 2024-09-11 09:38:48 +0900 Commit: GitHub CommitDate: 2024-09-11 09:38:48 +0900 Fixes [Bug #20718] (#11576) Fixes [Bug #20718] Allow objects that are not of type `RTypedData` to use the default free function, as `RTYPEDDATA_EMBEDDED_P` can return a false positive when casting non-`RTypedData` objects commit 948ca04a76c0031d17798f79fe3bbc5fb8462e90 Author: Takashi Kokubun AuthorDate: 2024-09-06 10:00:18 +0900 Commit: Takashi Kokubun CommitDate: 2024-09-06 10:00:19 +0900 Allow failures for all Travis jobs Every job on Travis is unstable now. commit c3f7041ab19fbf0e937126dc1b7397b97f768b9a Author: Hiroshi SHIBATA AuthorDate: 2024-09-06 09:55:34 +0900 Commit: GitHub CommitDate: 2024-09-06 09:55:34 +0900 Merge reline-0.5.10 (#11558) * Merge reline-0.5.8 * Merge reline-0.5.9 * Merge reline-0.5.10 commit 4eb51dfc9e67683a1a03fdf302d5ddd95cad716a Author: Hiroshi SHIBATA AuthorDate: 2024-09-05 00:47:06 +0900 Commit: GitHub CommitDate: 2024-09-05 00:47:06 +0900 Merge JSON 2.7.2 for Ruby 3.3 (#11541) Merge JSON 2.7.2 commit ef084cc8f4958c1b6e4ead99136631bef6d8ddba Author: Takashi Kokubun AuthorDate: 2024-09-03 01:09:08 +0900 Commit: Takashi Kokubun CommitDate: 2024-09-03 01:09:08 +0900 v3.3.5 commit d3ab7be8ca034ea58da7d6ebc77ad66e192cba18 Author: Takashi Kokubun AuthorDate: 2024-09-02 19:28:11 +0900 Commit: Takashi Kokubun CommitDate: 2024-09-02 19:28:11 +0900 merge revision(s) 657f4b99f61: [Backport #20667] Update bundled gems list as of 2024-08-02 commit c69d59e9b2d3d8621e50670087d4e53b73580c75 Author: Takashi Kokubun AuthorDate: 2024-09-02 19:25:22 +0900 Commit: Takashi Kokubun CommitDate: 2024-09-02 19:25:23 +0900 Sync tool/lib/core_assertions.rb from master It seems necessary to pass test-bundled-gems with REXML. commit cf9a6c2b63e6337a3f6ce76527446739e5aceb67 Author: Takashi Kokubun AuthorDate: 2024-09-02 19:19:13 +0900 Commit: Takashi Kokubun CommitDate: 2024-09-02 19:19:13 +0900 merge revision(s) a3562c2a0abf1c2bdd1d50377b4f929580782594: [Backport #20701] Remove incorrect setting of KW_SPLAT_MUT flag Fixes [Bug #20701] Co-authored-by: Pablo Herrero commit d83b5633b16f4ddcece4ff924f21c5a5851470cf Author: Takashi Kokubun AuthorDate: 2024-09-02 19:10:19 +0900 Commit: Takashi Kokubun CommitDate: 2024-09-02 19:10:19 +0900 merge revision(s) 992596fb7af18a7f472589a607d0eb3fbb03b49a: [Backport #20344] Fix next inside block argument stack underflow [Bug #20344] Fix compile_next adding removable adjust label commit b210c86a0201f6a97c4da8266908260746f53ae0 Author: Takashi Kokubun AuthorDate: 2024-09-02 19:07:09 +0900 Commit: Takashi Kokubun CommitDate: 2024-09-02 19:07:09 +0900 merge revision(s) 97449338d6cb42d9dd7c9ca61550616e7e6b6ef6: [Backport #20649] [Bug #20649] Allow `nil` as 2nd argument of `assign_error` Fallback to the last token element in that case, for the backward compatibilities. commit 6a4e79533b4454392f3afdfa0c4d35b763b68466 Author: Takashi Kokubun AuthorDate: 2024-09-02 18:56:18 +0900 Commit: Takashi Kokubun CommitDate: 2024-09-02 18:56:18 +0900 merge revision(s) 1870505f478cc75993b296b7144a45137ace6937: [Backport #20651] Fix wrong unreachable chunk remove when jump destination label is unremovable commit e0e23e7d5eb4da42c490b1d3408bd6e5047e8f83 Author: Takashi Kokubun AuthorDate: 2024-09-02 18:52:51 +0900 Commit: Takashi Kokubun CommitDate: 2024-09-02 18:52:51 +0900 merge revision(s) 29500e30346: [Backport #20667] Update bundled gems list as of 2024-08-22 commit 7b954e7bc64e201af1dd65e264e5091310efd362 Author: Takashi Kokubun AuthorDate: 2024-09-02 18:43:16 +0900 Commit: Takashi Kokubun CommitDate: 2024-09-02 18:44:25 +0900 Allow failures in Travis ppc64le and s390x Those jobs are way too unstable and provide very little benefit. e.g. https://app.travis-ci.com/github/ruby/ruby/jobs/624611955 https://app.travis-ci.com/github/ruby/ruby/jobs/625551620 commit 937964f3467a6242bb4bf1431983e6847d529338 Author: Hiroshi SHIBATA AuthorDate: 2024-08-28 08:00:27 +0900 Commit: GitHub CommitDate: 2024-08-28 08:00:27 +0900 Merge URI-0.13.1 for Ruby 3.3 (#11466) Merge URI-0.13.1 commit ac8d50e52ebc2d2684914e56548a64a65830c16a Author: Peter Zhu AuthorDate: 2024-08-24 07:48:08 +0900 Commit: GitHub CommitDate: 2024-08-24 07:48:08 +0900 [Backport 3.3] [Bug #20691] Fix use-after-free in WeakKeyMap#clear (#11443) Fix use-after-free in WeakKeyMap#clear [Bug #20691] If the WeakKeyMap has been marked but sweeping hasn't started yet and we cann WeakKeyMap#clear, then there could be a use-after-free because we do not call rb_gc_remove_weak to remove the key from the GC. For example, the following code triggers use-after-free errors in Valgrind: map = ObjectSpace::WeakKeyMap.new 1_000.times do 1_000.times do map[Object.new] = nil end map.clear end Output from Valgrind: ==61230== Invalid read of size 8 ==61230== at 0x25CAF8: gc_update_weak_references (default.c:5593) ==61230== by 0x25CAF8: gc_marks_finish (default.c:5641) ==61230== by 0x26031C: gc_marks_continue (default.c:5987) ==61230== by 0x26031C: gc_continue (default.c:2255) ==61230== by 0x2605FC: newobj_cache_miss (default.c:2589) ==61230== by 0x26111F: newobj_alloc (default.c:2622) ==61230== by 0x26111F: rb_gc_impl_new_obj (default.c:2701) ==61230== by 0x26111F: newobj_of (gc.c:890) ==61230== by 0x26111F: rb_wb_protected_newobj_of (gc.c:917) ==61230== by 0x2DE218: rb_class_allocate_instance (object.c:131) ==61230== by 0x2E32A8: class_call_alloc_func (object.c:2141) ==61230== by 0x2E32A8: rb_class_alloc (object.c:2113) ==61230== by 0x2E32A8: rb_class_new_instance_pass_kw (object.c:2172) ==61230== by 0x4296BC: vm_call_cfunc_with_frame_ (vm_insnhelper.c:3788) ==61230== by 0x44A9CD: vm_sendish (vm_insnhelper.c:5955) ==61230== by 0x44A9CD: vm_exec_core (insns.def:898) ==61230== by 0x43A0E4: rb_vm_exec (vm.c:2564) ==61230== by 0x2341B4: rb_ec_exec_node (eval.c:281) ==61230== by 0x236258: ruby_run_node (eval.c:319) ==61230== by 0x15D665: rb_main (main.c:43) ==61230== by 0x15D665: main (main.c:62) ==61230== Address 0x2159cb00 is 0 bytes inside a block of size 8 free'd ==61230== at 0x4849B2C: free (vg_replace_malloc.c:989) ==61230== by 0x248EF1: rb_gc_impl_free (default.c:8512) ==61230== by 0x248EF1: rb_gc_impl_free (default.c:8493) ==61230== by 0x248EF1: ruby_sized_xfree.constprop.0 (gc.c:4178) ==61230== by 0x4627EC: wkmap_free_table_i (weakmap.c:652) ==61230== by 0x3A54AF: apply_functor (st.c:1633) ==61230== by 0x3A54AF: st_general_foreach (st.c:1543) ==61230== by 0x3A54AF: rb_st_foreach (st.c:1640) ==61230== by 0x46203C: wkmap_clear (weakmap.c:973) ==61230== by 0x4296BC: vm_call_cfunc_with_frame_ (vm_insnhelper.c:3788) ==61230== by 0x44A9CD: vm_sendish (vm_insnhelper.c:5955) ==61230== by 0x44A9CD: vm_exec_core (insns.def:898) ==61230== by 0x43A0E4: rb_vm_exec (vm.c:2564) ==61230== by 0x2341B4: rb_ec_exec_node (eval.c:281) ==61230== by 0x236258: ruby_run_node (eval.c:319) ==61230== by 0x15D665: rb_main (main.c:43) ==61230== by 0x15D665: main (main.c:62) ==61230== Block was alloc'd at ==61230== at 0x484680F: malloc (vg_replace_malloc.c:446) ==61230== by 0x25C68E: rb_gc_impl_malloc (default.c:8527) ==61230== by 0x4622E9: wkmap_aset_replace (weakmap.c:817) ==61230== by 0x3A4D02: rb_st_update (st.c:1487) ==61230== by 0x4623E4: wkmap_aset (weakmap.c:854) ==61230== by 0x4296BC: vm_call_cfunc_with_frame_ (vm_insnhelper.c:3788) ==61230== by 0x44A9CD: vm_sendish (vm_insnhelper.c:5955) ==61230== by 0x44A9CD: vm_exec_core (insns.def:898) ==61230== by 0x43A0E4: rb_vm_exec (vm.c:2564) ==61230== by 0x2341B4: rb_ec_exec_node (eval.c:281) ==61230== by 0x236258: ruby_run_node (eval.c:319) ==61230== by 0x15D665: rb_main (main.c:43) ==61230== by 0x15D665: main (main.c:62) ==61230== ==61230== Invalid write of size 8 ==61230== at 0x25CB3B: gc_update_weak_references (default.c:5598) ==61230== by 0x25CB3B: gc_marks_finish (default.c:5641) ==61230== by 0x26031C: gc_marks_continue (default.c:5987) ==61230== by 0x26031C: gc_continue (default.c:2255) ==61230== by 0x2605FC: newobj_cache_miss (default.c:2589) ==61230== by 0x26111F: newobj_alloc (default.c:2622) ==61230== by 0x26111F: rb_gc_impl_new_obj (default.c:2701) ==61230== by 0x26111F: newobj_of (gc.c:890) ==61230== by 0x26111F: rb_wb_protected_newobj_of (gc.c:917) ==61230== by 0x2DE218: rb_class_allocate_instance (object.c:131) ==61230== by 0x2E32A8: class_call_alloc_func (object.c:2141) ==61230== by 0x2E32A8: rb_class_alloc (object.c:2113) ==61230== by 0x2E32A8: rb_class_new_instance_pass_kw (object.c:2172) ==61230== by 0x4296BC: vm_call_cfunc_with_frame_ (vm_insnhelper.c:3788) ==61230== by 0x44A9CD: vm_sendish (vm_insnhelper.c:5955) ==61230== by 0x44A9CD: vm_exec_core (insns.def:898) ==61230== by 0x43A0E4: rb_vm_exec (vm.c:2564) ==61230== by 0x2341B4: rb_ec_exec_node (eval.c:281) ==61230== by 0x236258: ruby_run_node (eval.c:319) ==61230== by 0x15D665: rb_main (main.c:43) ==61230== by 0x15D665: main (main.c:62) ==61230== Address 0x2159cb00 is 0 bytes inside a block of size 8 free'd ==61230== at 0x4849B2C: free (vg_replace_malloc.c:989) ==61230== by 0x248EF1: rb_gc_impl_free (default.c:8512) ==61230== by 0x248EF1: rb_gc_impl_free (default.c:8493) ==61230== by 0x248EF1: ruby_sized_xfree.constprop.0 (gc.c:4178) ==61230== by 0x4627EC: wkmap_free_table_i (weakmap.c:652) ==61230== by 0x3A54AF: apply_functor (st.c:1633) ==61230== by 0x3A54AF: st_general_foreach (st.c:1543) ==61230== by 0x3A54AF: rb_st_foreach (st.c:1640) ==61230== by 0x46203C: wkmap_clear (weakmap.c:973) ==61230== by 0x4296BC: vm_call_cfunc_with_frame_ (vm_insnhelper.c:3788) ==61230== by 0x44A9CD: vm_sendish (vm_insnhelper.c:5955) ==61230== by 0x44A9CD: vm_exec_core (insns.def:898) ==61230== by 0x43A0E4: rb_vm_exec (vm.c:2564) ==61230== by 0x2341B4: rb_ec_exec_node (eval.c:281) ==61230== by 0x236258: ruby_run_node (eval.c:319) ==61230== by 0x15D665: rb_main (main.c:43) ==61230== by 0x15D665: main (main.c:62) ==61230== Block was alloc'd at ==61230== at 0x484680F: malloc (vg_replace_malloc.c:446) ==61230== by 0x25C68E: rb_gc_impl_malloc (default.c:8527) ==61230== by 0x4622E9: wkmap_aset_replace (weakmap.c:817) ==61230== by 0x3A4D02: rb_st_update (st.c:1487) ==61230== by 0x4623E4: wkmap_aset (weakmap.c:854) ==61230== by 0x4296BC: vm_call_cfunc_with_frame_ (vm_insnhelper.c:3788) ==61230== by 0x44A9CD: vm_sendish (vm_insnhelper.c:5955) ==61230== by 0x44A9CD: vm_exec_core (insns.def:898) ==61230== by 0x43A0E4: rb_vm_exec (vm.c:2564) ==61230== by 0x2341B4: rb_ec_exec_node (eval.c:281) ==61230== by 0x236258: ruby_run_node (eval.c:319) ==61230== by 0x15D665: rb_main (main.c:43) ==61230== by 0x15D665: main (main.c:62) Co-authored-by: Jean Boussier commit 8657de70aa9d16066f9761710a5a74211046dc67 Author: Peter Zhu AuthorDate: 2024-08-23 07:54:55 +0900 Commit: GitHub CommitDate: 2024-08-23 07:54:55 +0900 [Backport 3.3] [Bug #20688] Fix use-after-free for WeakMap and WeakKeyMap (#11439) * Add struct weakmap_entry for WeakMap entries * Refactor wmap_foreach to pass weakmap_entry * Use wmap_foreach for wmap_mark * Refactor wmap_compact to use wmap_foreach * Remove wmap_free_entry * Fix WeakMap use-after-free [Bug #20688] We cannot free the weakmap_entry before the ST_DELETE because it could hash the key which would read the weakmap_entry and would cause a use-after-free. Instead, we store the entry and free it on the next iteration. For example, the following script triggers a use-after-free in Valgrind: weakmap = ObjectSpace::WeakMap.new 10_000.times { weakmap[Object.new] = Object.new } ==25795== Invalid read of size 8 ==25795== at 0x462297: wmap_cmp (weakmap.c:165) ==25795== by 0x3A2B1C: find_table_bin_ind (st.c:930) ==25795== by 0x3A5EAA: st_general_foreach (st.c:1599) ==25795== by 0x3A5EAA: rb_st_foreach (st.c:1640) ==25795== by 0x25C991: gc_mark_children (default.c:4870) ==25795== by 0x25C991: gc_marks_wb_unprotected_objects_plane (default.c:5565) ==25795== by 0x25C991: rgengc_rememberset_mark_plane (default.c:5557) ==25795== by 0x25C991: rgengc_rememberset_mark (default.c:6233) ==25795== by 0x25C991: gc_marks_start (default.c:6057) ==25795== by 0x25C991: gc_marks (default.c:6077) ==25795== by 0x25C991: gc_start (default.c:6723) ==25795== by 0x260F96: heap_prepare (default.c:2282) ==25795== by 0x260F96: heap_next_free_page (default.c:2489) ==25795== by 0x260F96: newobj_cache_miss (default.c:2598) ==25795== by 0x26197F: newobj_alloc (default.c:2622) ==25795== by 0x26197F: rb_gc_impl_new_obj (default.c:2701) ==25795== by 0x26197F: newobj_of (gc.c:890) ==25795== by 0x26197F: rb_wb_protected_newobj_of (gc.c:917) ==25795== by 0x2DEA88: rb_class_allocate_instance (object.c:131) ==25795== by 0x2E3B18: class_call_alloc_func (object.c:2141) ==25795== by 0x2E3B18: rb_class_alloc (object.c:2113) ==25795== by 0x2E3B18: rb_class_new_instance_pass_kw (object.c:2172) ==25795== by 0x429DDC: vm_call_cfunc_with_frame_ (vm_insnhelper.c:3786) ==25795== by 0x44B08D: vm_sendish (vm_insnhelper.c:5953) ==25795== by 0x44B08D: vm_exec_core (insns.def:898) ==25795== by 0x43A7A4: rb_vm_exec (vm.c:2564) ==25795== by 0x234914: rb_ec_exec_node (eval.c:281) ==25795== Address 0x21603710 is 0 bytes inside a block of size 16 free'd ==25795== at 0x4849B2C: free (vg_replace_malloc.c:989) ==25795== by 0x249651: rb_gc_impl_free (default.c:8527) ==25795== by 0x249651: rb_gc_impl_free (default.c:8508) ==25795== by 0x249651: ruby_sized_xfree.constprop.0 (gc.c:4178) ==25795== by 0x4626EC: ruby_sized_xfree_inlined (gc.h:277) ==25795== by 0x4626EC: wmap_free_entry (weakmap.c:45) ==25795== by 0x4626EC: wmap_mark_weak_table_i (weakmap.c:61) ==25795== by 0x3A5CEF: apply_functor (st.c:1633) ==25795== by 0x3A5CEF: st_general_foreach (st.c:1543) ==25795== by 0x3A5CEF: rb_st_foreach (st.c:1640) ==25795== by 0x25C991: gc_mark_children (default.c:4870) ==25795== by 0x25C991: gc_marks_wb_unprotected_objects_plane (default.c:5565) ==25795== by 0x25C991: rgengc_rememberset_mark_plane (default.c:5557) ==25795== by 0x25C991: rgengc_rememberset_mark (default.c:6233) ==25795== by 0x25C991: gc_marks_start (default.c:6057) ==25795== by 0x25C991: gc_marks (default.c:6077) ==25795== by 0x25C991: gc_start (default.c:6723) ==25795== by 0x260F96: heap_prepare (default.c:2282) ==25795== by 0x260F96: heap_next_free_page (default.c:2489) ==25795== by 0x260F96: newobj_cache_miss (default.c:2598) ==25795== by 0x26197F: newobj_alloc (default.c:2622) ==25795== by 0x26197F: rb_gc_impl_new_obj (default.c:2701) ==25795== by 0x26197F: newobj_of (gc.c:890) ==25795== by 0x26197F: rb_wb_protected_newobj_of (gc.c:917) ==25795== by 0x2DEA88: rb_class_allocate_instance (object.c:131) ==25795== by 0x2E3B18: class_call_alloc_func (object.c:2141) ==25795== by 0x2E3B18: rb_class_alloc (object.c:2113) ==25795== by 0x2E3B18: rb_class_new_instance_pass_kw (object.c:2172) ==25795== by 0x429DDC: vm_call_cfunc_with_frame_ (vm_insnhelper.c:3786) ==25795== by 0x44B08D: vm_sendish (vm_insnhelper.c:5953) ==25795== by 0x44B08D: vm_exec_core (insns.def:898) ==25795== by 0x43A7A4: rb_vm_exec (vm.c:2564) ==25795== Block was alloc'd at ==25795== at 0x484680F: malloc (vg_replace_malloc.c:446) ==25795== by 0x25CE9E: rb_gc_impl_malloc (default.c:8542) ==25795== by 0x462A39: wmap_aset_replace (weakmap.c:423) ==25795== by 0x3A5542: rb_st_update (st.c:1487) ==25795== by 0x462B8E: wmap_aset (weakmap.c:452) ==25795== by 0x429DDC: vm_call_cfunc_with_frame_ (vm_insnhelper.c:3786) ==25795== by 0x44B08D: vm_sendish (vm_insnhelper.c:5953) ==25795== by 0x44B08D: vm_exec_core (insns.def:898) ==25795== by 0x43A7A4: rb_vm_exec (vm.c:2564) ==25795== by 0x234914: rb_ec_exec_node (eval.c:281) ==25795== by 0x2369B8: ruby_run_node (eval.c:319) ==25795== by 0x15D675: rb_main (main.c:43) ==25795== by 0x15D675: main (main.c:62) * Fix use-after-free for WeakKeyMap [Bug #20688] We cannot free the key before the ST_DELETE because it could hash the key which would read the key and would cause a use-after-free. Instead, we store the key and free it on the next iteration. commit 9ae91eb2aa8a82315026e72fb58d89bc23432335 Author: Hiroshi SHIBATA AuthorDate: 2024-08-22 01:40:11 +0900 Commit: GitHub CommitDate: 2024-08-22 01:40:11 +0900 Backport warning feature for bundled gems from master (#11420) * Make sure to always use the right `warn` * lib/bundled_gems.rb: more reliable caller detection The `2` skipped frames went out of sync and now it should be `3`. Rather than just update the offset, we can implement a way that is adaptative as long as all require decorators are also called require. Also we should compute the corresponding `uplevel` otherwise the warning will still point decorators. Co-authored-by: "Hiroshi SHIBATA" * Warn ostruct for Ruby 3.5 * Warn pstore for Ruby 3.5 * Mark rdoc as bundled gems at Ruby 3.5 * Warn to use win32ole without Gemfile for Ruby 3.5 * EXACT list is mostly same as SINCE list on bundled gems. * Mark to warn fiddle as bundled gems for Ruby 3.5 * Mark to warn logger as bundled gems for Ruby 3.5 * We should use uplevel:2 in another case. Like the following scenario with bootsnap, that frames are same or smaller than frame_to_skip(=3). --- "/Users/hsbt/.local/share/rbenv/versions/3.3-dev/lib/ruby/3.3.0/bundled_gems.rb:69:in `block (2 levels) in replace_require'" "/Users/hsbt/.local/share/gem/gems/bootsnap-1.18.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'" "test_warn_bootsnap.rb:11:in `
'" --- * Delete unnecessary rubocop disable comment * Show correct script name with sub-feature case * Skip to show script name with using ruby -r option * Don't show script name when bundle exec and call ruby script directly. * Pick word fix from 34adc07372c10170b8ca36111d216cbd8e4699be --------- Co-authored-by: David Rodríguez Co-authored-by: Jean Boussier Co-authored-by: Kentaro Takeyama <75117116+obregonia1@users.noreply.github.com> commit 66312ad913d67bfd3c2c83b174eabf537f5def84 Author: John Hawthorn AuthorDate: 2024-08-15 02:19:53 +0900 Commit: GitHub CommitDate: 2024-08-15 02:19:53 +0900 Re-initialize vm->ractor.sched.lock after fork (#11372) [Bug #20633] Re-initialize vm->ractor.sched.lock after fork Previously under certain conditions it was possible to encounter a deadlock in the forked child process if ractor.sched.lock was held. Co-authored-by: Nathan Froyd commit 4d11a0960d1b9c88c4e85bfeffb83c5f08f7099b Author: Hiroshi SHIBATA AuthorDate: 2024-08-08 16:41:41 +0900 Commit: Hiroshi SHIBATA CommitDate: 2024-08-08 18:00:50 +0900 Added bootstrap job for release workflow commit 65cca99b30c65d462aa67969e0f16f6e45db4705 Author: Jean byroot Boussier AuthorDate: 2024-08-07 02:34:39 +0900 Commit: GitHub CommitDate: 2024-08-07 02:34:39 +0900 parse.y: const_decl_path don't replace destination node by a literal (#11314) [Bug #20668] The `dest` node is assumed to be a `CDECL`, so overwriting it with a `LIT` cause a crash on the next iteration. Co-authored-by: Jean Boussier commit f85c7deacc25738bd83ba182370c283ba82b61d4 Author: Hiroshi SHIBATA AuthorDate: 2024-07-31 01:05:54 +0900 Commit: GitHub CommitDate: 2024-07-31 01:05:54 +0900 Update RubyGems 3.5.16 and Bundler 2.5.16 for Ruby 3.3 (#11252) * Merge RubyGems-3.5.12 and Bundler-2.5.12 * Merge RubyGems-3.5.13 and Bundler-2.5.13 * Merge RubyGems-3.5.14 and Bundler-2.5.14 * Merge RubyGems-3.5.15 and Bundler-2.5.15 * Merge RubyGems-3.5.16 and Bundler-2.5.16 commit 0922afa95b3e390876cbea7f78d3d93d979f27d4 Author: Peter Zhu AuthorDate: 2024-07-31 01:05:09 +0900 Commit: GitHub CommitDate: 2024-07-31 01:05:09 +0900 [Bug #20654] Fix floor and ceil when ndigits is large (#11277) * Fix floor when ndigits is large [Bug #20654] This commit fixes Integer#floor and Float#floor when the number is negative and ndigits is large such that 10**ndigits is a bignum. Previously, it would return 0 in such cases. However, this would cause unexpected behaviour such as: puts -1.floor(-5) # => -100000 puts -1.floor(-10) # => -10000000000 puts -1.floor(-20) # => 0 This commit changes the last result so that it will return -100000000000000000000. * Fix ceil when ndigits is large [Bug #20654] This commit fixes Integer#ceil and Float#ceil when the number is negative and ndigits is large such that 10**ndigits is a bignum. Previously, it would return 0 in such cases. However, this would cause unexpected behaviour such as: puts 1.ceil(-5) # => 100000 puts 1.ceil(-10) # => 10000000000 puts 1.ceil(-20) # => 0 This commit changes the last result so that it will return 100000000000000000000. commit ce565cd4b851977bf37a470bee54e441bb60486d Author: Peter Zhu AuthorDate: 2024-07-30 09:45:26 +0900 Commit: GitHub CommitDate: 2024-07-30 09:45:26 +0900 [Bug #20653] Fix memory leak in String#start_with? when regexp times out (#11255) Fix memory leak in String#start_with? when regexp times out [Bug #20653] This commit refactors how Onigmo handles timeout. Instead of raising a timeout error, onig_search will return a ONIGERR_TIMEOUT which the caller can free memory, and then raise a timeout error. This fixes a memory leak in String#start_with when the regexp times out. For example: regex = Regexp.new("^#{"(a*)" * 10_000}x$", timeout: 0.000001) str = "a" * 1000000 + "x" 10.times do 100.times do str.start_with?(regex) rescue end puts `ps -o rss= -p #{$$}` end Before: 33216 51936 71152 81728 97152 103248 120384 133392 133520 133616 After: 14912 15376 15824 15824 16128 16128 16144 16144 16160 16160 commit 6d744837abc3f7f71a1f10c7ca399201f6f05e43 Author: Nobuyoshi Nakada AuthorDate: 2023-12-27 12:37:21 +0900 Commit: Takashi Kokubun CommitDate: 2024-07-29 11:55:48 +0900 [Bug #20088] Fix ARCH_FLAG for cross compiling commit 7571ad42f42939d172ec9a68dfe56aac724ee2ef Author: Peter Zhu AuthorDate: 2024-07-26 01:14:26 +0900 Commit: GitHub CommitDate: 2024-07-26 01:14:26 +0900 [Bug #20650] Fix memory leak in Regexp capture group when timeout (#11244) Fix memory leak in Regexp capture group when timeout [Bug #20650] The capture group allocates memory that is leaked when it times out. For example: re = Regexp.new("^#{"(a*)" * 10_000}x$", timeout: 0.000001) str = "a" * 1000000 + "x" 10.times do 100.times do re =~ str rescue Regexp::TimeoutError end puts `ps -o rss= -p #{$$}` end Before: 34688 56416 78288 100368 120784 140704 161904 183568 204320 224800 After: 16288 16288 16880 16896 16912 16928 16944 17184 17184 17200 commit 4667f8ec10269b0b5deca459f098abbdf3bae4ec Author: Jean byroot Boussier AuthorDate: 2024-07-23 08:35:22 +0900 Commit: GitHub CommitDate: 2024-07-23 08:35:22 +0900 bundled_gems.rb: Add a fast path (#11221) bundled_gems.rb: Add a fast path [Bug #20641] `Gem::BUNDLED_GEMS.warning?` adds a lot of extra work on top of `require`. When the call end up atually loading code the overhead is somewhat marginal. However it's not uncommon for code to go some late `require` in some paths, so it's expected that calling `require` with something already required is somewhat fast, and `bundled_gems.rb` breaks this assumption. To avoid this, we can have a fast path that in most case allow to short-circuit all the heavy computations. If we extract the feature basename and it doesn't match any of the bundled gems we care about we can return very early. With this change `require 'date'` is now only 1.33x slower on Ruby 3.3.3, than it was on Ruby 3.2.2, whereas before this change it was at least 100x slower. Co-authored-by: Jean Boussier commit 425e468d25a70740cef3ed676e9b82f7902e077a Author: Ivo Anjo AuthorDate: 2024-07-16 01:08:16 +0900 Commit: GitHub CommitDate: 2024-07-16 01:08:16 +0900 [Backport #20633] Fix the condition for `atomic_signal_fence` (#11166) [Bug #20633] Fix the condition for `atomic_signal_fence` `AC_CHECK_DECLS` defines `HAVE_DECL_SYMBOL` to 1 if declared, 0 otherwise, not undefined. Co-authored-by: kimuraw (Wataru Kimura) commit 3427a1679a8ca30465c684ac28449f495bff8a22 Author: Koichi Sasada AuthorDate: 2024-07-10 00:55:04 +0900 Commit: GitHub CommitDate: 2024-07-10 00:55:04 +0900 retry on cancelling of `getaddrinfo` (#11131) When the registerred unblock function is called, it should retry the cancelled blocking function if possible after checkints. For example, `SIGCHLD` can cancel this method, but it should not raise any exception if there is no trap handlers. The following is repro-code: ```ruby require 'socket' PN = 10_000 1000000.times{ p _1 PN.times{ fork{ sleep rand(0.3) } } i = 0 while i AuthorDate: 2024-07-09 08:28:22 +0900 Commit: Takashi Kokubun CommitDate: 2024-07-09 08:28:22 +0900 v3.3.4 commit 17e21d815583ef7d6be03f29e90a219602497626 Author: Takashi Kokubun AuthorDate: 2024-07-09 08:08:42 +0900 Commit: Takashi Kokubun CommitDate: 2024-07-09 08:08:42 +0900 merge revision(s) fc33559c: [Backport #20570] clear `kw_flag` if given hash is nil https://bugs.ruby-lang.org/issues/20570 is caused I missed to clear the `kw_flag` even if `keyword_hash` is nil. commit df8a08fb6a1f173a9c25db15fbe390096f39c2ff Author: Takashi Kokubun AuthorDate: 2024-07-09 08:04:30 +0900 Commit: Takashi Kokubun CommitDate: 2024-07-09 08:04:30 +0900 merge revision(s) 75aaeb35b82da26359b9418d2963384d0c55839c: [Backport #20239] [Bug #20239] Fix overflow at down-casting commit 9d583dd43a24354e8ae58c089cf091c1243e6e60 Author: Takashi Kokubun AuthorDate: 2024-07-09 07:58:13 +0900 Commit: Takashi Kokubun CommitDate: 2024-07-09 07:58:13 +0900 merge revision(s) fba8aff7, d8c6e91748871ab2287d7703347847fe18a292d2: [Backport #20592] [Bug #20592] Fix segfault when sending NULL to freeaddrinfo On alpine freeaddrinfo does not accept NULL pointer Fix dangling `else` commit 8a2e41d34b135046957e1195a5d4f4967a82a965 Author: Takashi Kokubun AuthorDate: 2024-07-09 07:55:17 +0900 Commit: Takashi Kokubun CommitDate: 2024-07-09 07:55:17 +0900 merge revision(s) 2dd46bb82ffc4dff01d7ea70922f0e407acafb4e: [Backport #20468] [Bug #20468] Fix safe navigation in `for` variable commit a40645e115e6cd6328bb302dfc78b16f6ad45938 Author: Takashi Kokubun AuthorDate: 2024-07-09 07:42:06 +0900 Commit: Takashi Kokubun CommitDate: 2024-07-09 07:42:06 +0900 merge revision(s) 01b13886: [Backport #20562] [Bug #20562] Categorize `RUBY_FREE_AT_EXIT` warning as experimental commit 9a8454ea5ca2bb4d6540d5c43b8e91e199ed1a8a Author: Takashi Kokubun AuthorDate: 2024-07-09 07:40:26 +0900 Commit: Takashi Kokubun CommitDate: 2024-07-09 07:40:28 +0900 Fix malformed JSON in macOS CI commit f811f79b3aa5d1fba3a9a631a802aa1d41fa5dc4 Author: Hiroshi SHIBATA AuthorDate: 2024-07-06 00:13:11 +0900 Commit: GitHub CommitDate: 2024-07-06 00:13:11 +0900 Refine macOS CI (#11107) Update macos runners with latest environments. * Use macos-14 instead of macos-arm-oss * Removed macos-11 and added macos-13 commit b2be36ef3349ebdab5423ea3337c03bcc3319b60 Author: Ivo Anjo AuthorDate: 2024-07-04 01:56:00 +0900 Commit: GitHub CommitDate: 2024-07-04 01:56:00 +0900 [Backport #11036] Add explicit compiler fence when pushing frames to ensure safe profiling (#11090) **What does this PR do?** This PR tweaks the `vm_push_frame` function to add an explicit compiler fence (`atomic_signal_fence`) to ensure profilers that use signals to interrupt applications (stackprof, vernier, pf2, Datadog profiler) can safely sample from the signal handler. This is a backport of #11036 to Ruby 3.3 . **Motivation:** The `vm_push_frame` was specifically tweaked in https://github.com/ruby/ruby/pull/3296 to initialize the a frame before updating the `cfp` pointer. But since there's nothing stopping the compiler from reordering the initialization of a frame (`*cfp =`) with the update of the cfp pointer (`ec->cfp = cfp`) we've been hesitant to rely on this on the Datadog profiler. In practice, after some experimentation + talking to folks, this reordering does not seem to happen. But since modern compilers have a way for us to exactly tell them not to do the reordering (`atomic_signal_fence`), this seems even better. I've actually extracted `vm_push_frame` into the "Compiler Explorer" website, which you can use to see the assembly output of this function across many compilers and architectures: https://godbolt.org/z/3oxd1446K On that link you can observe two things across many compilers: 1. The compilers are not reordering the writes 2. The barrier does not change the generated assembly output (== has no cost in practice) **Additional Notes:** The checks added in `configure.ac` define two new macros: * `HAVE_STDATOMIC_H` * `HAVE_DECL_ATOMIC_SIGNAL_FENCE` Since Ruby generates an arch-specific `config.h` header with these macros upon installation, this can be used by profilers and other libraries to test if Ruby was compiled with the fence enabled. **How to test the change?** As I mentioned above, you can check https://godbolt.org/z/3oxd1446K to confirm the compiled output of `vm_push_frame` does not change in most compilers (at least all that I've checked on that site). commit 291cc913503475a204c93a53a2f470c8cc6bfca2 Author: Peter Zhu AuthorDate: 2024-06-29 05:04:49 +0900 Commit: GitHub CommitDate: 2024-06-29 05:04:49 +0900 [Bug #20598] Fix corruption of internal encoding string (#11069) Fix corruption of internal encoding string [Bug #20598] Just like [Bug #20595], Encoding#name_list and Encoding#aliases can have their strings corrupted when Encoding.default_internal is set to nil. Co-authored-by: Matthew Valentine-House commit 7a780a3ef766e0622ade4a5fbf2518f73c38282b Author: Peter Zhu AuthorDate: 2024-06-27 23:46:53 +0900 Commit: GitHub CommitDate: 2024-06-27 23:46:53 +0900 [Bug #20595] Fix corruption of encoding name string (#11063) Fix corruption of encoding name string [Bug #20595] enc_set_default_encoding will free the C string if the encoding is nil, but the C string can be used by the encoding name string. This will cause the encoding name string to be corrupted. Consider the following code: Encoding.default_internal = Encoding::ASCII_8BIT names = Encoding.default_internal.names p names Encoding.default_internal = nil p names It outputs: ["ASCII-8BIT", "BINARY", "internal"] ["ASCII-8BIT", "BINARY", "\x00\x00\x00\x00\x00\x00\x00\x00"] Co-authored-by: Matthew Valentine-House commit 01762837b7f98934e402c6888e15de32a673b0fd Author: Hiroshi SHIBATA AuthorDate: 2024-06-21 02:57:19 +0900 Commit: GitHub CommitDate: 2024-06-21 02:57:19 +0900 [Bug #20581][3.3] Fix unintentional truncation for dependencies of bundled gems (#11006) * Try to load original gemspec from `.bundle/gems/foo-x.y.z/foo.gemspec`. `.bundle/specification/foo-x.y.z.gemspec` may be changed our toolchain * Try to find gemspec from `.bundle/specifications * Adjust indent commit 3160434c506fe2c7c9c69965dceb6e8fd7357c28 Author: Takashi Kokubun AuthorDate: 2024-06-21 02:41:13 +0900 Commit: Takashi Kokubun CommitDate: 2024-06-21 02:41:13 +0900 Add k0kubun to ruby_3_3 CODEOWNERS commit d1ffd5ecfa62a049b7c508f30b6912a890de1b32 Author: Jean byroot Boussier AuthorDate: 2024-06-21 02:39:20 +0900 Commit: GitHub CommitDate: 2024-06-21 02:39:20 +0900 String.new(capacity:) don't substract termlen (#11027) [Bug #20585] This was changed in 36a06efdd9f0604093dccbaf96d4e2cb17874dc8 because `String.new(1024)` would end up allocating `1025` bytes, but the problem with this change is that the caller may be trying to right size a String. So instead, we should just better document the behavior of `capacity:`. Co-authored-by: Jean Boussier commit a3eb5e5c70eaee12964cdd807b8f19950003141f Author: Aaron Patterson AuthorDate: 2024-06-14 02:02:32 +0900 Commit: GitHub CommitDate: 2024-06-14 02:02:32 +0900 Don't call `Warning.warn` unless the category is enabled (#10981) Don't call `Warning.warn` unless the category is enabled The warning category should be enabled if we want to call `Warning.warn`. This commit speeds up the following benchmark: ```ruby eval "def test; " + 1000.times.map { "' '.chomp!" }.join(";") + "; end" def run_benchmark count i = 0 while i < count start = Process.clock_gettime(Process::CLOCK_MONOTONIC) yield ms = Process.clock_gettime(Process::CLOCK_MONOTONIC) - start puts "itr ##{i}: #{(ms * 1000).to_i}ms" i += 1 end end run_benchmark(25) do 250.times do test end end ``` On `master` this runs at about 92ms per iteration. With this patch, it is 7ms per iteration. [Bug #20573] commit aa957546fa553abadd888ba18675c099df1178e0 Author: Alan Wu AuthorDate: 2024-06-14 02:02:02 +0900 Commit: GitHub CommitDate: 2024-06-14 02:02:02 +0900 Bump shlex from 1.1.0 to 1.3.0 in /yjit/bindgen (#10985) `yjit-bindgen` isn't run to build Ruby releases at all, but people might be running security scanners on the source tarball. Upgrade this dependency to calm the scanners. Backport of . See: commit f1c7b6f435f1167a0514b39a5f72f55cec4d1426 Author: Takashi Kokubun AuthorDate: 2024-06-12 08:54:24 +0900 Commit: Takashi Kokubun CommitDate: 2024-06-12 08:54:24 +0900 v3.3.3 commit 97b1bf9ac11848c2783264d22bf7cdb7f32a21cf Author: Peter Zhu AuthorDate: 2024-06-12 08:43:32 +0900 Commit: GitHub CommitDate: 2024-06-12 08:43:32 +0900 [Bug #20270] Fix --parser=prism (#10970) Co-authored-by: Takashi Kokubun commit d1869cfb852cf95b5a51025c016437ab46b12104 Author: Takashi Kokubun AuthorDate: 2024-06-12 03:28:03 +0900 Commit: Takashi Kokubun CommitDate: 2024-06-12 03:29:27 +0900 redmine-backporter.rb: Prepend commit: to shorter revs Some of the places in Redmine (e.g. Associated revisions) print revisions using only 8 characters. Even when I copied a revision from there, I want to prepend commit: in the message. commit 23f4b78ad8844ec81cb02fad25a6247a2d498582 Author: Takashi Kokubun AuthorDate: 2024-06-12 03:17:32 +0900 Commit: Takashi Kokubun CommitDate: 2024-06-12 03:17:32 +0900 merge revision(s) 27321290: [Backport #20521] [Bug #20521] ripper: Clean up strterm commit d3b139821294f56e6b31e28608c534d9f0920fc2 Author: Takashi Kokubun AuthorDate: 2024-06-12 03:11:23 +0900 Commit: Takashi Kokubun CommitDate: 2024-06-12 03:11:23 +0900 merge revision(s) 1e08a9f0e9058186db18f29efc6458c00f10a856: [Backport #20499] [Bug #20499] Use Xcode owned tools for Xcode clang Xcode has its own version tools that may be incompatible with genuine LLVM tools, use the tools in the same directory. commit 8951040aadca57fce633b0f714248de78a962c22 Author: Jean byroot Boussier AuthorDate: 2024-06-12 03:08:31 +0900 Commit: GitHub CommitDate: 2024-06-12 03:08:31 +0900 [3.3 backport] compile.c: use putspecialobject for RubyVM::FrozenCore (#10962) compile.c: use putspecialobject for RubyVM::FrozenCore [Bug #20569] `putobject RubyVM::FrozenCore`, is not serializable, we have to use `putspecialobject VM_SPECIAL_OBJECT_VMCORE`. Co-authored-by: Jean Boussier commit 4c50d23245689761e04db450ced9fe9fa76997d0 Author: Peter Zhu AuthorDate: 2024-06-12 03:01:29 +0900 Commit: GitHub CommitDate: 2024-06-12 03:01:29 +0900 Raise SyntaxError on invalid encoding symbol (#10967) [Bug #20280] Backport of #10014. commit 40251ed0dfe99bb09c2fa542fce603ade25e3729 Author: Peter Zhu AuthorDate: 2024-06-11 08:05:58 +0900 Commit: GitHub CommitDate: 2024-06-11 08:05:58 +0900 Fix inconsistent evaluation of keyword splat (#10959) [Bug #20180] Backports #9624. commit d0327a7224d8d778a75c7554b287369895dc17be Author: Jean byroot Boussier AuthorDate: 2024-06-06 06:54:24 +0900 Commit: GitHub CommitDate: 2024-06-06 06:54:24 +0900 Don't add `+YJIT` to `RUBY_DESCRIPTION` until it's actually enabled (#10920) If you start Ruby with `--yjit-disable`, the `+YJIT` shouldn't be added until `RubyVM::YJIT.enable` is actually called. Otherwise it's confusing in crash reports etc. Co-authored-by: Jean Boussier commit e0fe6f70170924397b957d6cfa84774592b1c809 Author: Takashi Kokubun AuthorDate: 2024-06-05 16:28:47 +0900 Commit: Takashi Kokubun CommitDate: 2024-06-05 16:29:17 +0900 merge revision(s) f8abd24b1f28998157da1230b231419ef7b81722: [Backport #20522] Improve YJIT performance warning regression test [Bug #20522] commit 06f470ce66be24f82d3720dd2bb08b18b16753ac Author: Hiroshi SHIBATA AuthorDate: 2024-06-05 13:36:46 +0900 Commit: GitHub CommitDate: 2024-06-05 13:36:46 +0900 Merge RubyGems 3.5.11 and Bundler 2.5.11 for Ruby 3.3 (#10870) Co-authored-by: Nobuyoshi Nakada commit 1ff55bb09dca302d42951059a73e6d237fd8c338 Author: Takashi Kokubun AuthorDate: 2024-06-05 06:58:37 +0900 Commit: Takashi Kokubun CommitDate: 2024-06-05 06:58:37 +0900 merge revision(s) 05553cf22d43dd78b8f30cc4591230b5c000c538: [Backport #20517] [Bug #20517] Make a multibyte character one token at meta escape commit 4f00d98b327e3aa23564aa765488d15bc60c9e79 Author: Jean byroot Boussier AuthorDate: 2024-06-05 05:21:58 +0900 Commit: GitHub CommitDate: 2024-06-05 05:21:58 +0900 [3.3 backport] Do not emit shape transition warnings when YJIT is compiling (#10911) Do not emit shape transition warnings when YJIT is compiling [Bug #20522] If `Warning.warn` is redefined in Ruby, emitting a warning would invoke Ruby code, which can't safely be done when YJIT is compiling. Co-authored-by: Jean Boussier Co-authored-by: Takashi Kokubun commit b74f669e2fbe5c63409878e7a9f9d39c8554ff77 Author: Alan Wu AuthorDate: 2024-06-05 05:17:41 +0900 Commit: GitHub CommitDate: 2024-06-05 05:17:41 +0900 YJIT: Fix out of bounds access when splatting empty array (#10905) This is a backport of 6c8ae44a388e5c03b7db90376af3652007b574e8 with a test tailored to crash the 3.3.x branch (from GH-10904). Previously, we read the last element array even when the array was empty, doing an out-of-bounds access. This sometimes caused a SEGV. [Bug #20496] commit 1df1538be4a494bbc5ef6e3504312a0284948709 Author: Takashi Kokubun AuthorDate: 2024-06-05 05:14:09 +0900 Commit: Takashi Kokubun CommitDate: 2024-06-05 05:14:09 +0900 merge revision(s) f54369830f83a65fb54916d762883fbe6eeb7d0b, 338eb0065bd81ba8ae8b9402abc94804a24594cc, ac636f5709feb1d9d7a0c46a86be153be765cf21: [Backport #20516] Revert "Rollback to released version numbers of stringio and strscan" This reverts commit 6a79e53823e328281b9e9eee53cd141af28f8548. [ruby/strscan] StringScanner#captures: Return nil not "" for unmached capture (https://github.com/ruby/strscan/pull/72) fix https://github.com/ruby/strscan/issues/70 If there is no substring matching the group (s[3]), the behavior is different. If there is no substring matching the group, the corresponding element (s[3]) should be nil. ``` s = StringScanner.new('foobarbaz') #=> # s.scan /(foo)(bar)(BAZ)?/ #=> "foobar" s[0] #=> "foobar" s[1] #=> "foo" s[2] #=> "bar" s[3] #=> nil s.captures #=> ["foo", "bar", ""] s.captures.compact #=> ["foo", "bar", ""] ``` ``` s = StringScanner.new('foobarbaz') #=> # s.scan /(foo)(bar)(BAZ)?/ #=> "foobar" s[0] #=> "foobar" s[1] #=> "foo" s[2] #=> "bar" s[3] #=> nil s.captures #=> ["foo", "bar", nil] s.captures.compact #=> ["foo", "bar"] ``` https://docs.ruby-lang.org/ja/latest/method/MatchData/i/captures.html ``` /(foo)(bar)(BAZ)?/ =~ "foobarbaz" #=> 0 $~.to_a #=> ["foobar", "foo", "bar", nil] $~.captures #=> ["foo", "bar", nil] $~.captures.compact #=> ["foo", "bar"] ``` * StringScanner#captures is not yet documented. https://docs.ruby-lang.org/ja/latest/class/StringScanner.html https://github.com/ruby/strscan/commit/1fbfdd3c6f [ruby/strscan] Bump version https://github.com/ruby/strscan/commit/d6f97ec102 commit 0a0338b06fcc3690346d5a3bec60bbcee85ec7ce Author: Takashi Kokubun AuthorDate: 2024-06-05 03:43:25 +0900 Commit: Takashi Kokubun CommitDate: 2024-06-05 03:43:25 +0900 merge revision(s) 9f708d48f6df37ee9600db9d51b57a156609a13b, 0301473fb523c71d8cdc4966971f31f502001185, 874e9fc34d728f8e2444d15aa6759befd217c464, 7f0e26b7f99bf76408569892ce20318501f74729: [Backport #20516] Clear runtime dependencies if default gems is specified. The current build system uses runtime dependencies from only `.bundle` directory. We shouldn't install runtime dependencies from rubygems.org when `make test-bundled-gems` is invoked. Fixed dependencies list format Don't need to remove ruby2_keywords dependency from drb Re-use strscan with ruby repo commit 12c806acc3923115f2c6590c885e43f2f24a17e3 Author: Takashi Kokubun AuthorDate: 2024-06-05 03:31:00 +0900 Commit: Takashi Kokubun CommitDate: 2024-06-05 03:32:28 +0900 merger.rb: Put spaces in between revisions so that they are linked correctly on GitHub commit c9bec74b21f0e6cf05d9b200a1636bdb8069de8c Author: Takashi Kokubun AuthorDate: 2024-06-01 09:13:18 +0900 Commit: Takashi Kokubun CommitDate: 2024-06-01 09:13:33 +0900 merge revision(s) 70ad58cb62b195ba86a5ef07a565b22b02a040ea: [Backport #20516] Update bundled_gems commit ea196a3c9f181d368ed1d308201f44a88de69b42 Author: Takashi Kokubun AuthorDate: 2024-05-31 06:53:54 +0900 Commit: Takashi Kokubun CommitDate: 2024-05-31 06:53:54 +0900 merge revision(s) be7c91db44d6b8dba8fa11ff782965b4bfa0b3c8: [Backport #20515] Do not pollute toplevel namespace commit 8f5b1bb64b6cdc09574390e7efb8cb5550762b78 Author: Takashi Kokubun AuthorDate: 2024-05-31 05:05:32 +0900 Commit: Takashi Kokubun CommitDate: 2024-05-31 05:05:32 +0900 merge revision(s) fd549b229b0822198ddc847703194263a2186ed1: [Backport #20515] test_bignum: defined? returns String (#10880) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit didn't verify the test is working properly due to mistaken auto-merge… [Bug #20515] bug: https://bugs.ruby-lang.org/issues/20515 follow-up: 22e4eeda6561693367fc7a00b92b90f46b09cabd follow-up: https://github.com/ruby/ruby/pull/10875 commit 74ba1914dd120e0c9ea33d86eae7c5d3e5c730f1 Author: Takashi Kokubun AuthorDate: 2024-05-31 03:54:34 +0900 Commit: Takashi Kokubun CommitDate: 2024-05-31 03:54:34 +0900 merge revision(s) 22e4eeda6561693367fc7a00b92b90f46b09cabd,1ab7c412d2e3880a7ad233c32e93961888f8145c: [Backport #20515] ci: Test whether GMP is working in compilers.yml (#10875) Avoid reoccurence of [Bug #20515] Requires https://github.com/ruby/ruby/pull/10876 since 18eaf0be905e3e251423b42d6f4e56b7cae1bc3b bug: https://bugs.ruby-lang.org/issues/20515 RUBY_CHECK_HEADER didn't define HAVE_{header-file} (#10876) --with-gmp is not working at all because HAVE_GMP_H was missing since 18eaf0be90. [Bug #20515] bug: https://bugs.ruby-lang.org/issues/20515 follow-up: https://bugs.ruby-lang.org/issues/20494 follow-up: 18eaf0be905e3e251423b42d6f4e56b7cae1bc3b follow-up: https://github.com/ruby/ruby/pull/10805 commit b13cf49036f0a454063cde25807785adc00f8995 Author: Takashi Kokubun AuthorDate: 2024-05-31 03:13:15 +0900 Commit: Takashi Kokubun CommitDate: 2024-05-31 03:13:15 +0900 merge revision(s) 055613fd868a8c94e43893f8c58a00cdd2a81f6d,127d7a35df10ee2bc99f44b888972b2c5361d84f,e2a9b87126d59e4766479a7aa12cf7a648f46506: [Backport #20447] Fix pointer incompatiblity Since the subsecond part is discarded, WIDEVAL to VALUE conversion is needed. Some functions are not used when `THREAD_MODEL=none` `rb_thread_sched_destroy` is not used now at all commit e5a195edf62fe1bf7146a191da13fa1c4fecbd71 Author: Takashi Kokubun AuthorDate: 2024-05-30 09:23:11 +0900 Commit: Takashi Kokubun CommitDate: 2024-05-30 09:23:11 +0900 v3.3.2 commit a9b6a7bf7204cd1244da7e05fafea721cf3b2e4f Author: Takashi Kokubun AuthorDate: 2024-05-30 09:11:36 +0900 Commit: Takashi Kokubun CommitDate: 2024-05-30 09:11:36 +0900 merge revision(s) ce20367a0e2f1fcfabebf3b6bea732fc71fa79f7: [Backport #20500] Define `incflags` also on mswin commit a96233161a0e917b57c3c2cd9598d75d8b7721f5 Author: Takashi Kokubun AuthorDate: 2024-05-30 08:53:29 +0900 Commit: Takashi Kokubun CommitDate: 2024-05-30 08:53:29 +0900 merge revision(s) 5fa6ba9568e87e43e08a4daeba1572254c589fb1: [Backport #20500] [Bug #20500] Search non-default directories for jemalloc Co-Authored-by: lish82 (Hiroki Katagiri) commit b2eb7f47b3e5f5a4681aa364ed960a0809460cdb Author: Takashi Kokubun AuthorDate: 2024-05-30 08:50:13 +0900 Commit: Takashi Kokubun CommitDate: 2024-05-30 08:50:13 +0900 merge revision(s) 1faeb44dfcf777ace28321e80d0ebf942161a0a7,7f87ad9fc4bc45faf8cd33602a025f27c094b2fd: [Backport #20431] Check if macros are defined before using Assume macros with the same prefix would be defined together. Refer autoconfigured endian macro (#10572) Remove the case `RB_IO_BUFFER_HOST_ENDIAN` is not defined. commit d65da20eb4ebf5fcbc7cd0333e1406e1dd3c373b Author: Takashi Kokubun AuthorDate: 2024-05-30 08:48:51 +0900 Commit: Takashi Kokubun CommitDate: 2024-05-30 08:48:51 +0900 merge revision(s) ef3803ed4028810f9088019f0db1a366370ab53a: [Backport #20502] Ignore the result of pthread_kill in ubf_wakeup_thread After an upgrade to Ruby 3.3.0, I experienced reproducible production crashes of the form: [BUG] pthread_kill: No such process (ESRCH) This is the only pthread_kill call in Ruby. The result of pthread_kill was previously ignored in Ruby 3.2 and below. Checking the result was added in be1bbd5b7d40ad863ab35097765d3754726bbd54 (MaNy). I have not yet been able to create a minimal self-contained example, but it should be safe to remove the checks. commit 0044b6aefc656874adb9266829f19870dcd3d75e Author: Takashi Kokubun AuthorDate: 2024-05-30 08:34:43 +0900 Commit: Takashi Kokubun CommitDate: 2024-05-30 08:35:18 +0900 merge revision(s) bc002971b6ad483dbf69b8a275c44412bb6ab954: [Backport #20094] [Bug #20094] Distinguish `begin` and parentheses commit b3f2ccea5efb060e99d289b2272ddfe413e4f051 Author: Takashi Kokubun AuthorDate: 2024-05-30 08:18:29 +0900 Commit: Takashi Kokubun CommitDate: 2024-05-30 08:18:29 +0900 merge revision(s) 18eaf0be905e3e251423b42d6f4e56b7cae1bc3b: [Backport #20494] [Bug #20494] Search non-default directories for GMP Co-Authored-by: lish82 (Hiroki Katagiri) commit cf643fabd5c564c1dfeb337b50b4aa76ebaa11c1 Author: Takashi Kokubun AuthorDate: 2024-05-30 07:52:15 +0900 Commit: Takashi Kokubun CommitDate: 2024-05-30 07:52:15 +0900 merge revision(s) d292a9b98ce03c76dbe13138d20b9fbf613cc02d: [Backport #20453] [Bug #20453] segfault in Regexp timeout https://bugs.ruby-lang.org/issues/20228 started freeing `stk_base` to avoid a memory leak. But `stk_base` is sometimes stack allocated (using `xalloca`), so the free only works if the regex stack has grown enough to hit `stack_double` (which uses `xmalloc` and `xrealloc`). To reproduce the problem on master and 3.3.1: ```ruby Regexp.timeout = 0.001 /^(a*)x$/ =~ "a" * 1000000 + "x"' ``` Some details about this potential fix: `stk_base == stk_alloc` on [init](https://github.com/ruby/ruby/blob/dde99215f2bc60c22a00fc941ff7f714f011e920/regexec.c#L1153), so if `stk_base != stk_alloc` we can be sure we called [`stack_double`](https://github.com/ruby/ruby/blob/dde99215f2bc60c22a00fc941ff7f714f011e920/regexec.c#L1210) and it's safe to free. It's also safe to free if we've [saved](https://github.com/ruby/ruby/blob/dde99215f2bc60c22a00fc941ff7f714f011e920/regexec.c#L1187-L1189) the stack to `msa->stack_p`, since we do the `stk_base != stk_alloc` check before saving. This matches the check we do inside [`stack_double`](https://github.com/ruby/ruby/blob/dde99215f2bc60c22a00fc941ff7f714f011e920/regexec.c#L1221) commit 5c06e930748ef6bdb4ac4751ba16b7b604da3db0 Author: Takashi Kokubun AuthorDate: 2024-05-30 07:47:26 +0900 Commit: Takashi Kokubun CommitDate: 2024-05-30 07:47:26 +0900 merge revision(s) 6ade36c06b7cef948099b8f5f483763498705d12: [Backport #20414] `Fiber#raise` recursively raises on nested resuming_fiber. (#10482) * Improve consistency of `Fiber.current.raise`. commit b44c02ad5a1c5c8c1c62b83eec96cf3a8a2107bc Author: Takashi Kokubun AuthorDate: 2024-05-30 07:44:55 +0900 Commit: Takashi Kokubun CommitDate: 2024-05-30 07:44:55 +0900 merge revision(s) c479492a6701dcef3d3a96de8946ecf7beb079d4: [Backport #20427] Resize ary when `Array#sort!` block modifies embedded ary In cases where `rb_ary_sort_bang` is called with a block and tmp is an embedded array, we need to account for the block potentially impacting the capacity of ary. ex: ``` var_0 = (1..70).to_a var_0.sort! do |var_0_block_129, var_1_block_129| var_0.pop var_1_block_129 <=> var_0_block_129 end.shift(3) ``` The above example can put the array into a corrupted state resulting in a heap buffer overflow and possible segfault: ``` ERROR: AddressSanitizer: heap-buffer-overflow on address [...] WRITE of size 560 at 0x60b0000034f0 thread T0 [...] ``` This commit adds a conditional to determine when the capacity of ary has been modified by the provided block. If this is the case, ensure that the capacity of ary is adjusted to handle at minimum the len of tmp. commit 5688bcb54a640b353bed4ff49032ea00f947e1aa Author: Takashi Kokubun AuthorDate: 2024-05-30 07:43:01 +0900 Commit: Takashi Kokubun CommitDate: 2024-05-30 07:43:01 +0900 merge revision(s) 5d1702e01a36e11b183fe29ce10780a9b1a41cf0: [Backport #20413] Enumerator should use a non-blocking fiber, change `rb_fiber_new` to be non-blocking by default. (#10481) commit a24f19742bfa398a3b32c51df01133db7bcbc6e0 Author: Takashi Kokubun AuthorDate: 2024-05-30 07:40:49 +0900 Commit: Takashi Kokubun CommitDate: 2024-05-30 07:40:49 +0900 merge revision(s) 58918788abd63901588e4aa1e39b5c057321c10a: [Backport #20342] [Bug #20342] Consider wrapped load in `main` methods commit 72a45ac7a3cc9bbecf641ac505f8ee791c9da48c Author: Takashi Kokubun AuthorDate: 2024-05-30 07:11:56 +0900 Commit: Takashi Kokubun CommitDate: 2024-05-30 07:11:56 +0900 merge revision(s) 3a04ea2d0379dd8c6623c2d5563e6b4e23986fae: [Backport #20305] [Bug #20305] Fix matching against an incomplete character When matching against an incomplete character, some `enclen` calls are expected not to exceed the limit, and some are expected to return the required length and then the results are checked if it exceeds. commit 6e46a363a8f29d93cf6992805ee67d029cea030f Author: Takashi Kokubun AuthorDate: 2024-05-30 03:46:33 +0900 Commit: Takashi Kokubun CommitDate: 2024-05-30 03:46:33 +0900 merge revision(s) a7ff264477105b5dc0ade6facad4176a1b73df0b: [Backport #20393] Don't clear pending interrupts in the parent process. (#10365) commit 541fc816fcb697307d666fed644ddd07ca5e942e Author: Takashi Kokubun AuthorDate: 2024-05-30 03:35:46 +0900 Commit: Takashi Kokubun CommitDate: 2024-05-30 03:35:46 +0900 [ruby/zlib] Bump up 3.1.1 commit 2ae6df6d03c6d9750be559641c4c9f3b39eac62d Author: Takashi Kokubun AuthorDate: 2024-05-30 03:35:23 +0900 Commit: Takashi Kokubun CommitDate: 2024-05-30 03:35:23 +0900 merge revision(s) 9f8f32bf9f3758ba67dd2afe7e07d9eccb68bbc7: [Backport #20289] [ruby/zlib] In Zlib::GzipReader#eof? check if we're actually at eof Only consider it eof if we read ahead and something fills the buf. If not, we may only have empty blocks and the footer. Fixes https://github.com/ruby/zlib/pull/56 https://github.com/ruby/zlib/commit/437bea8003 commit 2f4fe76eff0a8c6ab7a1d2fb845453acfc3cb206 Author: Takashi Kokubun AuthorDate: 2024-02-23 07:34:19 +0900 Commit: Takashi Kokubun CommitDate: 2024-05-30 03:13:02 +0900 Skip under_gc_compact_stress on s390x (#10073) commit 548c7cb9f517dcb8029bd9698187c81819e08edd Author: Takashi Kokubun AuthorDate: 2024-05-30 03:07:07 +0900 Commit: Takashi Kokubun CommitDate: 2024-05-30 03:07:07 +0900 merge revision(s) 7e4b1f8e1935a10df3c41ee60ca0987d73281126: [Backport #20322] [Bug #20322] Fix rb_enc_interned_str_cstr null encoding The documentation for `rb_enc_interned_str_cstr` notes that `enc` can be a null pointer, but this currently causes a segmentation fault when trying to autoload the encoding. This commit fixes the issue by checking for NULL before calling `rb_enc_autoload`. commit 8f1084db9b07cb74f99de70d6f8bb6076d27d8aa Author: Takashi Kokubun AuthorDate: 2024-05-30 03:00:27 +0900 Commit: Takashi Kokubun CommitDate: 2024-05-30 03:00:27 +0900 merge revision(s) dc146babf47a84bbd1f176d766637d4a40327019,f23d5028059078a346efc977287b669d494a5a3f,a0f7de814ae5c299d6ce99bed5fb308a05d50ba0: [Backport #20296] [Bug #20296] Clear errinfo when `exception: false` [Bug #20296] Refine the test [Bug #20296] Fix the default assertion message commit 22c1e5f126db8e057bdb48d91aa5ae449e019226 Author: Takashi Kokubun AuthorDate: 2024-05-30 02:57:42 +0900 Commit: Takashi Kokubun CommitDate: 2024-05-30 02:57:43 +0900 Suppress -Wclobbered warnings Co-authored-by: Nobuyoshi Nakada commit e5a1119f1b4fd93d60540cd4277e61851c3ebe45 Author: Hiroya Fujinami AuthorDate: 2023-12-30 01:08:51 +0900 Commit: Takashi Kokubun CommitDate: 2024-05-30 02:51:23 +0900 Reduce `if` for decreasing counter on OP_REPEAT_INC (#9393) This commit also reduces the warning `'stkp' may be used uninitialized in this function`. commit bcf5cd3ba47e70c5c1c6328f61887bbac2f9d41b Author: Nobuyoshi Nakada AuthorDate: 2024-01-24 19:33:25 +0900 Commit: Takashi Kokubun CommitDate: 2024-05-30 02:48:19 +0900 Initialize errno variables and fix maybe-uninitialized warnings commit bbb3075c46b838da3bac5e699837cf0cc90320d9 Author: Takashi Kokubun AuthorDate: 2024-05-30 02:33:20 +0900 Commit: Takashi Kokubun CommitDate: 2024-05-30 02:39:10 +0900 Sort backport revisions by commit timestamps commit f12c947192aa47b355015384e5c82cbf674023f1 Author: Takashi Kokubun AuthorDate: 2024-05-30 02:19:49 +0900 Commit: Takashi Kokubun CommitDate: 2024-05-30 02:19:49 +0900 merge revision(s) e04146129ec6898dd6a9739dad2983c6e9b68056: [Backport #20292] [Bug #20292] Truncate embedded string to new capacity commit a8b2317d16fa172edd3cd7e6fcb3bc694287d109 Author: Takashi Kokubun AuthorDate: 2024-05-30 02:02:15 +0900 Commit: Takashi Kokubun CommitDate: 2024-05-30 02:02:15 +0900 merge revision(s) 78d9fe69479d32214a52ad7291c3973f1b6b7f6f: [Backport #20286] Ensure that exiting thread invokes end-of-life behaviour. (#10039) commit 6aaf673e4d3fa1f8a90e6006aadefddcb87fe1de Author: Takashi Kokubun AuthorDate: 2024-05-30 01:59:52 +0900 Commit: Takashi Kokubun CommitDate: 2024-05-30 01:59:52 +0900 Skip broken SSL provider tests for freebsd commit 6e9dbcbacc489a4cf992c2cd9987c8031fa19fb3 Author: Takashi Kokubun AuthorDate: 2024-05-30 01:56:55 +0900 Commit: Takashi Kokubun CommitDate: 2024-05-30 01:56:55 +0900 Force-skip a LOAD_PATH spec for rhel_zlinux commit 3cab9b997945ba5d3d06b374d5e12e07293f8e73 Author: Peter Zhu AuthorDate: 2023-12-30 12:14:38 +0900 Commit: Takashi Kokubun CommitDate: 2024-05-30 01:40:45 +0900 Change test_warmup_frees_pages to check each size pool This should help in debugging the intermittent test failures on CI: TestProcess#test_warmup_frees_pages [test/ruby/test_process.rb:2779]: <201> expected but was <202>. commit 8c29a3776e9e9ba070425c5b6548ecbc8ee21366 Author: Takashi Kokubun AuthorDate: 2024-05-30 01:38:38 +0900 Commit: Takashi Kokubun CommitDate: 2024-05-30 01:38:46 +0900 Skip a flaky Ractor test https://github.com/ruby/ruby/actions/runs/9289798294/job/25564563437 commit 015d6bae8b5bfe44708c824419c8a72e5b7b4837 Author: Takashi Kokubun AuthorDate: 2024-05-30 01:32:03 +0900 Commit: Takashi Kokubun CommitDate: 2024-05-30 01:32:03 +0900 Skip a flaky test in RBS commit 9cb804a2bd6eb43b67a716ccef6db400e47f29cf Author: Takashi Kokubun AuthorDate: 2024-05-29 09:46:47 +0900 Commit: Takashi Kokubun CommitDate: 2024-05-29 09:46:47 +0900 merge revision(s) 04729fe68dceddab045be7324e26c2bb15aa62c7: [Backport #20288] Fix exception handling in `rb_fiber_scheduler_set`. (#10042) commit 0e96dd93c51337a01fa29b563c2d330c472b03b7 Author: Takashi Kokubun AuthorDate: 2024-05-29 09:45:21 +0900 Commit: Takashi Kokubun CommitDate: 2024-05-29 09:46:44 +0900 merger.rb: Don't ask "conflicts resolved?" if not needed commit 4d34fb54b0e21af3802cddb669f34fe446ed5f3d Author: Takashi Kokubun AuthorDate: 2024-05-29 09:17:03 +0900 Commit: Takashi Kokubun CommitDate: 2024-05-29 09:17:04 +0900 redmine-backporter.rb: Prepend commit: to every revision commit 6383d0afac6aa02b3e72d08128cc1d8327f149fa Author: Takashi Kokubun AuthorDate: 2024-05-29 09:10:33 +0900 Commit: Takashi Kokubun CommitDate: 2024-05-29 09:10:33 +0900 merge revision(s) 015b0e2e1d312e2be60551587389c8da5c585e6f,ac1e9e443a0d6a4d4c0801c26d1d8bd33d9eb431: [Backport #20195] YJIT: Fix unused warnings ``` warning: unused import: `condition::Condition` --> src/asm/arm64/arg/mod.rs:13:9 | 13 | pub use condition::Condition; | ^^^^^^^^^^^^^^^^^^^^ | = note: `#[warn(unused_imports)]` on by default warning: unused import: `rb_yjit_fix_mul_fix as rb_fix_mul_fix` --> src/cruby.rs:188:9 | 188 | pub use rb_yjit_fix_mul_fix as rb_fix_mul_fix; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: unused import: `rb_insn_len as raw_insn_len` --> src/cruby.rs:142:9 | 142 | pub use rb_insn_len as raw_insn_len; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: `#[warn(unused_imports)]` on by default ``` Make asm public so it stops warning about unused public stuff in there. YJIT: Fix ruby2_keywords splat+rest and drop bogus checks YJIT didn't guard for ruby2_keywords hash in case of splat calls that land in methods with a rest parameter, creating incorrect results. The compile-time checks didn't correspond to any actual effects of ruby2_keywords, so it was masking this bug and YJIT was needlessly refusing to compile some code. About 16% of fallback reasons in `lobsters` was due to the ISeq check. We already handle the tagging part with exit_if_supplying_kw_and_has_no_kw() and should now have a dynamic guard for all splat cases. Note for backporting: You also need 7f51959ff1. [Bug #20195] commit d7ad60373988487ae746129dfd7f65df1dd13b86 Author: Takashi Kokubun AuthorDate: 2024-05-29 09:00:12 +0900 Commit: Takashi Kokubun CommitDate: 2024-05-29 09:01:13 +0900 redmine-backporter.rb: Remove an unneeded space from #backport_command_string I don't want to leave unneeded spaces in the command history by copy-pasting the entire line. commit 9c81bbbbb738a5747eab5455292536369977ee92 Author: Takashi Kokubun AuthorDate: 2024-05-29 08:55:49 +0900 Commit: Takashi Kokubun CommitDate: 2024-05-29 08:55:49 +0900 merge revision(s) 7f51959ff14fbe06bc1afd283d1af17b26161cf4: [Backport #20204] YJIT: Move guard up for a case of splat+rest Previously, YJIT put the guard for having enough items to extract from splat array at a place where the side exit is invalid, so if the guard fails, YJIT could raise something other than ArgumentError. Move the guard up to a place before any stack manipulation. [Bug #20204] commit 912c7df0a51455b764fc3008a99365f79213e8e0 Author: Takashi Kokubun AuthorDate: 2024-05-29 08:52:27 +0900 Commit: Takashi Kokubun CommitDate: 2024-05-29 08:52:29 +0900 Skip a failing spec for rhel_zlinux https://rubyci.s3.amazonaws.com/rhel_zlinux/ruby-3.3/log/20240528T214850Z.fail.html.gz ``` 1) Execution variable $: default $LOAD_PATH entries until sitelibdir included have @gem_prelude_index set FAILED Expected ["/home/chkbuild/build/20240528T214850Z/mspec/lib/mspec/lib", "/home/chkbuild/build/20240528T214850Z/mspec/lib", "./ruby/tool/lib", "/home/linux1/chkbuild/tmp/build/20240528T214850Z/lib/ruby/site_ruby/3.3.0", "/home/linux1/chkbuild/tmp/build/20240528T214850Z/lib/ruby/site_ruby/3.3.0/s390x-linux", "/home/linux1/chkbuild/tmp/build/20240528T214850Z/lib/ruby/site_ruby", "/home/linux1/chkbuild/tmp/build/20240528T214850Z/lib/ruby/vendor_ruby/3.3.0", "/home/linux1/chkbuild/tmp/build/20240528T214850Z/lib/ruby/vendor_ruby/3.3.0/s390x-linux", "/home/linux1/chkbuild/tmp/build/20240528T214850Z/lib/ruby/vendor_ruby", "/home/linux1/chkbuild/tmp/build/20240528T214850Z/lib/ruby/3.3.0", "/home/linux1/chkbuild/tmp/build/20240528T214850Z/lib/ruby/3.3.0/s390x-linux"].include? "/home/chkbuild/build/20240528T214850Z/lib/ruby/site_ruby/3.3.0" to be truthy but was false /home/chkbuild/build/20240528T214850Z/rubyspec/language/predefined_spec.rb:885:in `block (2 levels) in ' /home/chkbuild/build/20240528T214850Z/rubyspec/language/predefined_spec.rb:846:in `' ``` It does have /home/linux1/chkbuild/tmp/build/20240528T214850Z/lib/ruby/site_ruby/3.3.0, so it seems actually fine. It seems to be failing due to its setup issues. Skipping this until we figure out how to fix it. commit 9443606caf22b5b9f3285a6ab5ea86e3ac210e23 Author: Nobuyoshi Nakada AuthorDate: 2024-05-18 15:34:49 +0900 Commit: Takashi Kokubun CommitDate: 2024-05-29 08:38:55 +0900 [rubygems/rubygems] Should rescue vendored net-http exception https://github.com/rubygems/rubygems/commit/7d2c4cf364 commit 239a8cc7d7c6cc60e5f32865ebfcd5e2f5c9c08d Author: Takashi Kokubun AuthorDate: 2024-05-29 08:28:00 +0900 Commit: Takashi Kokubun CommitDate: 2024-05-29 08:30:45 +0900 merger.rb: Auto-detect tickets when --ticket is not given commit 90fda2da5f0d5841b80d7f8dca4b38aaf2a80f51 Author: Takashi Kokubun AuthorDate: 2024-05-29 07:42:47 +0900 Commit: Takashi Kokubun CommitDate: 2024-05-29 07:54:54 +0900 merger.rb: Drop an obsoleted command from help It was needed only for SVN, and we dropped SVN support. commit 077558ee2b8dd3ed414b78384f21118f833eb259 Author: Hiroshi SHIBATA AuthorDate: 2024-05-29 07:54:39 +0900 Commit: GitHub CommitDate: 2024-05-29 07:54:39 +0900 [Bug #20511] Update reline-0.5.7 (#10848) * Update reline-0.5.7 * Update irb-1.13.1 commit 917f3e5d22b3364002eb1fdc2f94b35ff76f6a73 Author: Takashi Kokubun AuthorDate: 2024-05-29 07:15:23 +0900 Commit: Takashi Kokubun CommitDate: 2024-05-29 07:17:51 +0900 merge revision(s) f36a71e26995b69ff72bc132bbcf40ad89571414: [Backport #20307] [Bug #20307] Fix `Hash#update` to make frozen copy of string keys commit 7d3e71330fd38c402ae4a6ec14f43eb95cf50435 Author: Nobuyoshi Nakada AuthorDate: 2024-02-27 01:22:01 +0900 Commit: Takashi Kokubun CommitDate: 2024-05-29 07:17:51 +0900 Extract `RHASH_STRING_KEY_P` commit 691aab8d3af36343c01f6d02cb6d3c0aea4a1f4f Author: Nobuyoshi Nakada AuthorDate: 2024-02-26 23:47:45 +0900 Commit: Takashi Kokubun CommitDate: 2024-05-29 07:17:51 +0900 Extract `RHASH_IDENTHASH_P` commit 4024feba55ccf7525e4e1e0fdbca9eda5dac3b86 Author: Alan Wu AuthorDate: 2024-01-30 06:37:37 +0900 Commit: Takashi Kokubun CommitDate: 2024-05-29 07:05:52 +0900 Fix RegExp warning causing flaky Ripper failure Sometimes this file get picked up and break Ripper tests: TestRipper::Generic#test_parse_files:test/ruby assert_separately failed with error message pid 63392 exit 0 | test_regexp.rb:2025: warning: character class has duplicated range https://github.com/ruby/ruby/actions/runs/7699956651/job/20982702553#step:12:103 commit 93d7bf5c5c635567fa519affdfd54edeb9064834 Author: NARUSE, Yui AuthorDate: 2024-05-29 06:52:47 +0900 Commit: GitHub CommitDate: 2024-05-29 06:52:47 +0900 merge revision(s) bbd249e351af7e4929b518a5de73a832b5617273: [Backport #20192] (#10249) * merge revision(s) bbd249e351af7e4929b518a5de73a832b5617273: [Backport #20192] YJIT: Properly reject keyword splat with `yield` We don't have support for keyword splat anywhere, but we tried to compile these anyways in case of `invokeblock`. This led to bad things happening such as passing the wrong value and passing a hash into rb_yjit_array_len(), which raised in the middle of compilation. [Bug #20192] * Skip a new test for RJIT commit f18ba2c6c6a9b2a74a8c2d655ab42947edb1fc6a Author: Takashi Kokubun AuthorDate: 2024-05-29 06:28:49 +0900 Commit: Takashi Kokubun CommitDate: 2024-05-29 06:29:07 +0900 merger.rb: Use commit: prefix in more places commit b77b5c191513f5f281e72a51e6b2de29e2d2d7a6 Author: Takashi Kokubun AuthorDate: 2024-05-29 06:21:35 +0900 Commit: Takashi Kokubun CommitDate: 2024-05-29 06:22:45 +0900 merge revision(s) 5e0c17145131e073814c7e5b15227d0b4e73cabe: [Backport #20169] Make io_fwrite safe for compaction [Bug #20169] Embedded strings are not safe for system calls without the GVL because compaction can cause pages to be locked causing the operation to fail with EFAULT. This commit changes io_fwrite to use rb_str_tmp_frozen_no_embed_acquire, which guarantees that the return string is not embedded. commit 62f450285bbe1f8fbbaf12540d6538985234f3d8 Author: Takashi Kokubun AuthorDate: 2024-05-29 06:05:50 +0900 Commit: Takashi Kokubun CommitDate: 2024-05-29 06:10:26 +0900 merger.rb: Improve the help message It wasn't clear whether the backport command takes a commit hash or a ticket number. commit 4c007195663796ca0650f2cadddbd38284996b8a Author: Takashi Kokubun AuthorDate: 2024-05-29 05:58:20 +0900 Commit: Takashi Kokubun CommitDate: 2024-05-29 05:58:23 +0900 Allow failing test-annocheck It causes flaky failures like this: ``` + /usr/bin/docker build --rm -t ruby-fedora-annocheck-copy --build-arg=FILES=ruby -f ../src/tool/annocheck/Dockerfile-copy . DEPRECATED: The legacy builder is deprecated and will be removed in a future release. Install the buildx component to build images with BuildKit: https://docs.docker.com/go/buildx/ Sending build context to Docker daemon 556.5MB Step 1/6 : FROM docker.io/fedora:latest toomanyrequests: You have reached your pull rate limit. You may increase the limit by authenticating and upgrading: https://www.docker.com/increase-rate-limit ``` It seems not that important to maintain the job for backports, so let's allow failing it until we fix it in master branch. commit c564c4a0992d15c4b1a2c395061c9a95bc060767 Author: Takashi Kokubun AuthorDate: 2024-05-29 05:53:43 +0900 Commit: Takashi Kokubun CommitDate: 2024-05-29 05:53:43 +0900 Sync merger.rb from master commit 82ff749451aa54bc282cffc916736fd62fa65f4d Author: Takashi Kokubun AuthorDate: 2024-05-29 05:39:30 +0900 Commit: Takashi Kokubun CommitDate: 2024-05-29 05:39:30 +0900 Sync redmine-backporter.rb from master commit 46dbcd8e9b9c2b20be0af58ada427ff4a5f1794b Author: Takashi Kokubun AuthorDate: 2024-05-29 05:39:04 +0900 Commit: Takashi Kokubun CommitDate: 2024-05-29 05:39:05 +0900 Sync .gitignore from master to avoid committing unrelated files unexpectedly commit 8dda932bcded3607c189d169333bbad0860d7efd Author: Hiroshi SHIBATA AuthorDate: 2024-03-26 11:10:20 +0900 Commit: Takashi Kokubun CommitDate: 2024-05-29 05:30:26 +0900 Fix extension installer for out-of-place build https://github.com/ruby/ruby/pull/9673#issuecomment-2019028293 commit cf460840b825f2fd7521b0ae211353080d33ceef Author: Hiroshi SHIBATA AuthorDate: 2024-03-25 15:16:22 +0900 Commit: Takashi Kokubun CommitDate: 2024-05-29 05:30:26 +0900 Guard makefile target at cross-build http://rubyci.s3.amazonaws.com/crossruby/crossruby-master-aarch64/log/20240325T041917Z.fail.html.gz commit 716473e348eb74c5d437f570cd0d2a1efe30a8ae Author: Hiroshi SHIBATA AuthorDate: 2024-03-25 17:12:31 +0900 Commit: Takashi Kokubun CommitDate: 2024-05-29 05:30:26 +0900 Use load_gemspec instead of Gem::Specification.load. We need to purge `git ls-files` from gemspec in default gems. commit 1849046d1f51b3630d5c68e2e6ff0746860eac9d Author: David Rodriguez AuthorDate: 2024-03-21 01:18:20 +0900 Commit: Takashi Kokubun CommitDate: 2024-05-29 05:30:26 +0900 Consider extensions in gems outside of ext/ commit e60ad0b6f5ba9ad2da83472049cd7dd6f830139e Author: David Rodriguez AuthorDate: 2024-03-21 01:17:40 +0900 Commit: Takashi Kokubun CommitDate: 2024-05-29 05:30:26 +0900 Extract `root` helper It holds the root directory for each type of default gem (ext/ or lib/). commit 642cf3fc8a0f7c31875d4bbc3628f835ebfc48a5 Author: David Rodriguez AuthorDate: 2024-03-19 04:58:49 +0900 Commit: Takashi Kokubun CommitDate: 2024-05-29 05:30:26 +0900 Consider `target_prefix` in extension Makefiles commit 57b56225acbf2d0c08c3c9271c531e389359f453 Author: David Rodríguez AuthorDate: 2024-01-24 18:22:26 +0900 Commit: Takashi Kokubun CommitDate: 2024-05-29 05:30:26 +0900 Consistently put requirable features in default gemspecs file list commit 7ff330419f6beba9828681421762d6b495656056 Author: David Rodríguez AuthorDate: 2024-01-24 18:16:48 +0900 Commit: Takashi Kokubun CommitDate: 2024-05-29 05:30:26 +0900 Fix gemspec file list for extension gems So that it also includes requirable features provided by extensions. commit a63114323b614429998e7f9d30d9b344d271f20a Author: David Rodriguez AuthorDate: 2024-03-21 01:10:36 +0900 Commit: Takashi Kokubun CommitDate: 2024-05-29 05:30:26 +0900 Simplify FileCollector interface commit e43393ac0f0376bb831f310de285a4e72837c972 Author: David Rodriguez AuthorDate: 2024-03-21 00:43:26 +0900 Commit: Takashi Kokubun CommitDate: 2024-05-29 05:30:26 +0900 Use `$ext_build_dir` consistently Instead of hardcoded "ext". commit 6edd65a080b156f1ce78fdcf57214c1644a049db Author: Eugene Kenny AuthorDate: 2024-04-24 20:10:48 +0900 Commit: Takashi Kokubun CommitDate: 2024-05-29 05:29:22 +0900 [Bug #20450] Remove rubyarchdir from bootsnap paths commit 718a78cdf552fe08e4f90a29b062542ceeecfe60 Author: Hiroshi SHIBATA AuthorDate: 2024-04-08 16:20:15 +0900 Commit: Takashi Kokubun CommitDate: 2024-05-29 05:29:22 +0900 Added test case for bundled gems warning with -r option. This is for 76914d474d93b7485973c3bca4fa43b59f5bd383 commit a121e698401b947655921a071ee2edf01992219d Author: Hiroshi SHIBATA AuthorDate: 2024-03-25 13:31:19 +0900 Commit: Takashi Kokubun CommitDate: 2024-05-29 05:29:22 +0900 Bootsnap and Zeitwerk are working correctly now commit edebbade1b48613f59c7cc7fcc82ece601b54dce Author: Hiroshi SHIBATA AuthorDate: 2024-03-25 13:22:45 +0900 Commit: Takashi Kokubun CommitDate: 2024-05-29 05:29:22 +0900 Add newline each test script commit 178de0e95356e6be288b1b722fd3a02d1db10bd8 Author: Hiroshi SHIBATA AuthorDate: 2024-03-25 12:45:30 +0900 Commit: Takashi Kokubun CommitDate: 2024-05-29 05:29:22 +0900 Added test script for bundled_gems.rb with zeitwerk commit 7a3cc549465125d48bedd0a22660a379914340a8 Author: Masataka Pocke Kuwabara AuthorDate: 2024-04-08 12:41:29 +0900 Commit: Takashi Kokubun CommitDate: 2024-05-29 05:29:22 +0900 Fix error when default gem is loaded from `-r` option This patch fixes an error when a default gem that will be migrated to a bundled gem is loaded from `-r` option. Problem === `bundle exec ruby -rostruct -e ''` unexpectedly raises the following error: ```console $ ruby -v ruby 3.4.0dev (2024-04-08T02:39:00Z master 6f7e8e278f) [arm64-darwin21] $ bundle init && bundle install $ bundle exec ruby -rostruct -e '' /Users/kuwabara.masataka/.rbenv/versions/trunk/lib/ruby/3.4.0+0/bundled_gems.rb:111:in 'Gem::BUNDLED_GEMS.warning?': undefined method 'find' for nil (NoMethodError) caller = caller_locations(3, 3).find {|c| c&.absolute_path} ^^^^^ from /Users/kuwabara.masataka/.rbenv/versions/trunk/lib/ruby/3.4.0+0/bundled_gems.rb:75:in 'block (2 levels) in Kernel#replace_require' ``` Solution === This patch uses a safe navigation operator to fix this problem. By this change, the command will show the warning message correctly. ```console $ bundle exec ruby -rostruct -e '' warning: ostruct was loaded from the standard library, but will no longer be part of the default gems since Ruby 3.5.0. Add ostruct to your Gemfile or gemspec. ``` commit 121cec845a0c3d3529ebfdebafb339dddbfdeb90 Author: Hiroshi SHIBATA AuthorDate: 2024-01-19 16:08:38 +0900 Commit: Takashi Kokubun CommitDate: 2024-05-29 05:29:22 +0900 Ignore warnings on the bundled gems repo commit 0b3a2cf5d33688378a0d947f1623879838fb9c4c Author: Jean Boussier AuthorDate: 2024-03-25 16:45:02 +0900 Commit: Takashi Kokubun CommitDate: 2024-05-29 05:29:22 +0900 lib/bundled_gems.rb: dynamically ignore Kernel.require decorators Followup: https://github.com/ruby/ruby/pull/10347 This avoid directly referencing bootsnap and zeitwerk, and also handle other gems that may decorate `require`. commit b6c07acedb3ca56471754a082b3db20bb863c92e Author: KJ Tsanaktsidis AuthorDate: 2024-05-29 05:17:24 +0900 Commit: GitHub CommitDate: 2024-05-29 05:17:24 +0900 Backport bug #20493 to Ruby 3.3 (#10798) Inline RB_VM_SAVE_MACHINE_CONTEXT into BLOCKING_REGION There's an exhaustive explanation of this in the linked redmine bug, but the short version is as follows: blocking_region_begin can spill callee-saved registers to the stack for its own use. That means they're not saved to ec->machine by the call to setjmp, since by that point they're already on the stack and new, different values are in the real registers. ec->machine's end-of-stack pointer is also bumped to accomodate this, BUT, after blocking_region_begin returns, that points past the end of the stack! As far as C is concerned, that's fine; the callee-saved registers are restored when blocking_region_begin returns. But, if another thread triggers GC, it is relying on finding references to Ruby objects by walking the stack region pointed to by ec->machine. If the C code in exec; subsequently does things that use that stack memory, then the value will be overwritten and the GC might prematurely collect something it shouldn't. [Bug #20493] commit 1c991f3bf40c2e506a819732dd0c4afe5d3c5f46 Author: Jun Aruga AuthorDate: 2024-03-12 22:39:05 +0900 Commit: Hiroshi SHIBATA CommitDate: 2024-04-30 14:02:50 +0900 [ruby/openssl] test_asn1.rb: Remove the assertions of the time string format without second. This commit fixes the following errors in the tests. Because the OpenSSL project changed the code to make the time string format without second invalid. So, we drop the assertions. ``` 1) Error: test_generalizedtime(OpenSSL::TestASN1): OpenSSL::ASN1::ASN1Error: generalizedtime is too short /home/runner/work/ruby-openssl/ruby-openssl/test/openssl/test_asn1.rb:698:in `decode' /home/runner/work/ruby-openssl/ruby-openssl/test/openssl/test_asn1.rb:698:in `decode_test' /home/runner/work/ruby-openssl/ruby-openssl/test/openssl/test_asn1.rb:433:in `test_generalizedtime' 430: OpenSSL::ASN1::GeneralizedTime.new(Time.utc(9999, 9, 8, 23, 43, 39)) 431: # LibreSSL 3.6.0 requires the seconds element 432: return if libressl? => 433: decode_test B(%w{ 18 0D }) + "201612081934Z".b, 434: OpenSSL::ASN1::GeneralizedTime.new(Time.utc(2016, 12, 8, 19, 34, 0)) 435: # not implemented 436: # decode_test B(%w{ 18 13 }) + "https://github.com/ruby/openssl/commit/201612081934+0930".b, 2) Error: test_utctime(OpenSSL::TestASN1): OpenSSL::ASN1::ASN1Error: utctime is too short /home/runner/work/ruby-openssl/ruby-openssl/test/openssl/test_asn1.rb:698:in `decode' /home/runner/work/ruby-openssl/ruby-openssl/test/openssl/test_asn1.rb:698:in `decode_test' /home/runner/work/ruby-openssl/ruby-openssl/test/openssl/test_asn1.rb:411:in `test_utctime' 408: end 409: # Seconds is omitted. LibreSSL 3.6.0 requires it 410: return if libressl? => 411: decode_test B(%w{ 17 0B }) + "1609082343Z".b, 412: OpenSSL::ASN1::UTCTime.new(Time.utc(2016, 9, 8, 23, 43, 0)) 413: # not implemented 414: # decode_test B(%w{ 17 11 }) + "https://github.com/ruby/openssl/commit/500908234339+0930".b, ``` https://github.com/ruby/openssl/commit/2e826d5715 commit 85863f4d4d6f798a3a2afc33be243e5604c222a6 Author: Xi Ruoyao AuthorDate: 2024-04-24 14:42:09 +0900 Commit: Hiroshi SHIBATA CommitDate: 2024-04-30 14:02:50 +0900 [ruby/net-http] Skip test_session_reuse_but_expire with OpenSSL 3.3 OpenSSL 3.3.0 9 Apr 2024 is also broken. Signed-off-by: Xi Ruoyao https://github.com/ruby/net-http/commit/ab525c956d commit c56cd86388092faec079981f779f140717020d58 Author: NARUSE, Yui AuthorDate: 2024-04-23 19:20:14 +0900 Commit: NARUSE, Yui CommitDate: 2024-04-23 19:20:14 +0900 v3.3.1 commit dde99215f2bc60c22a00fc941ff7f714f011e920 Author: Isaac Peka <7493006+isaac-peka@users.noreply.github.com> AuthorDate: 2023-08-24 20:14:33 +0900 Commit: NARUSE, Yui CommitDate: 2024-04-22 16:42:03 +0900 Fix handling of reg->dmin in Regex matching commit c38fc1bb36597264840d96d7475b9891c61c5240 Author: Hiroshi SHIBATA AuthorDate: 2024-04-12 14:01:47 +0900 Commit: NARUSE, Yui CommitDate: 2024-04-22 16:29:28 +0900 Fix Use-After-Free issue for Regexp Co-authored-by: Isaac Peka <7493006+isaac-peka@users.noreply.github.com> commit 7227b859a7bf7626ee73de8130796657b7c7f3b5 Author: Hiroshi SHIBATA AuthorDate: 2024-04-16 11:22:22 +0900 Commit: GitHub CommitDate: 2024-04-16 11:22:22 +0900 Merge RubyGems 3.5.9 and Bundler 2.5.9 (Fixed CI at Ruby 3.3) (#10348) * Merge RubyGems-3.5.6 and Bundler-2.5.6 * Merge RubyGems-3.5.7 and Bundler-2.5.7 * Merge RubyGems-3.5.8 and Bundler-2.5.8 * Partly reverted about https://github.com/rubygems/rubygems/pull/7483 * Merge RubyGems-3.5.9 and Bundler-2.5.9 commit 2f654588d9e0cefff1c23529d2f2672029e1bd21 Author: Hiroshi SHIBATA AuthorDate: 2024-03-25 17:09:56 +0900 Commit: GitHub CommitDate: 2024-03-25 17:09:56 +0900 Backport https://github.com/ruby/ruby/pull/10347 (#10349) Fix incorrect warning target with Zeitwerk and support warning with Bootsnap. commit 6d6818883b8f613fe9b6c72ac7eb9b313bba097b Author: NARUSE, Yui AuthorDate: 2024-03-22 10:33:40 +0900 Commit: GitHub CommitDate: 2024-03-22 10:33:40 +0900 merge revision(s) b176315827d1082f43628013a7d89fda02724d33: [Backport #20324] (#10329) [Bug #20324] Uncomparable ranges are not overlapping commit a24802e8fd7e05077256605885c82ffd8221bc94 Author: NARUSE, Yui AuthorDate: 2024-03-22 09:25:36 +0900 Commit: GitHub CommitDate: 2024-03-22 09:25:36 +0900 merge revision(s) c7ce2f537f96ab2cf2f5fc2982d6147866ff5340: [Backport #20304] (#10311) Fix memory leak in setting encodings There is a memory leak in Encoding.default_external= and Encoding.default_internal= because the duplicated name is not freed when overwriting. 10.times do 1_000_000.times do Encoding.default_internal = nil end puts `ps -o rss= -p #{$$}` end Before: 25664 41504 57360 73232 89168 105056 120944 136816 152720 168576 After: 9648 9648 9648 9680 9680 9680 9680 9680 9680 9680 commit eb7cb164cffc86b63d2e2528c73e160c33b7a2e5 Author: Hiroshi SHIBATA AuthorDate: 2024-03-21 16:12:38 +0900 Commit: GitHub CommitDate: 2024-03-21 16:12:38 +0900 CVE-2024-27281 for Ruby 3.3 (#10316) Merge RDoc-6.6.3.1 commit f79b1d1ef1f7aa64d20f0eadbb3b0f8f7084deb3 Author: NARUSE, Yui AuthorDate: 2024-03-21 14:31:36 +0900 Commit: GitHub CommitDate: 2024-03-21 14:31:36 +0900 merge revision(s) e626da82eae3d437b84d4f9ead0164d436b08e1a,f3af5ae7e6c1c096bbfe46d69de825a02b1696cf: [Backport #20311] (#10312) Don't pin named structs defined in Ruby [Bug #20311] `rb_define_class_under` assumes it's called from C and that the reference might be held in a C global variable, so it adds the class to the VM root. In the case of `Struct.new('Name')` it's wasteful and make the struct immortal. Make Struct memory leak test faster [Bug #20311] It times out on some platform, so we can reduce iterations. On my machine it completes in 250ms and RSS grows 8X. commit 57a0afe2090b8d05673d650b1e8bf9ae67449b1f Author: NARUSE, Yui AuthorDate: 2024-03-21 11:23:21 +0900 Commit: GitHub CommitDate: 2024-03-21 11:23:21 +0900 merge revision(s) 081ee3d35509110f383cb7dd8d1205def0cdd1e8,1c97abaabae6844c861705fd07f532292dcffa74: [Backport #19907] (#10315) Add memory leak test for eval kwargs De-dup identical callinfo objects Previously every call to vm_ci_new (when the CI was not packable) would result in a different callinfo being returned this meant that every kwarg callsite had its own CI. When calling, different CIs result in different CCs. These CIs and CCs both end up persisted on the T_CLASS inside cc_tbl. So in an eval loop this resulted in a memory leak of both types of object. This also likely resulted in extra memory used, and extra time searching, in non-eval cases. For simplicity in this commit I always allocate a CI object inside rb_vm_ci_lookup, but ideally we would lazily allocate it only when needed. I hope to do that as a follow up in the future. commit 821719a505bbc628ddd80b90ae892666006eada1 Author: NARUSE, Yui AuthorDate: 2024-03-21 11:18:06 +0900 Commit: GitHub CommitDate: 2024-03-21 11:18:06 +0900 merge revision(s) d3279a0c11ca45ca85027e7eb74dc4aac52c478b: [Backport #20327] (#10313) [Bug #20327] Do not count subsecond to calculate UTC offset Assume that there will never be any time zones with UTC offsets that are subseconds. Historically, UTC offset has only been used down to the second. commit a63e979853783601a60228b45741f8b3776e5507 Author: NARUSE, Yui AuthorDate: 2024-03-21 10:45:01 +0900 Commit: GitHub CommitDate: 2024-03-21 10:45:01 +0900 merge revision(s) d19d683a354530a27b4cbb049223f8dc70c75849,de1a586ecc2ee7f465f0c0a69291054136a3a819: [Backport #20250] (#10308) rb_obj_setup: do not copy RUBY_FL_SEEN_OBJ_ID [Bug #20250] We're seting up a new instance, so it never had an associated object_id. proc.c: get rid of `CLONESETUP` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [Bug #20253] All the way down to Ruby 1.9, `Proc`, `Method`, `UnboundMethod` and `Binding` always had their own specific clone and dup routine. This caused various discrepancies with how other objects behave on `dup` and `clone. [Bug #20250], [Bug #20253]. This commit get rid of `CLONESETUP` and use the the same codepath as all other types, so ensure consistency. NB: It's still not accepting the `freeze` keyword argument on `clone`. Co-Authored-By: Étienne Barrié commit a406c516685f1950269c4e43d13cc748f0bfbc06 Author: NARUSE, Yui AuthorDate: 2024-03-21 10:28:51 +0900 Commit: GitHub CommitDate: 2024-03-21 10:28:51 +0900 merge revision(s) ae8990aef098410ecc2b5f48fea9d7d171a3c5f6: [Backport #20183] (#10310) Alias init functions The extension library has each initialization function named "Init_" + basename. If multiple extensions have the same base name (such as cgi/escape and erb/escape), the same function will be registered for both names. To fix this conflict, rename the initialization functions under sub directories using using parent names, when statically linking. commit 05787897f69087abdabee926971cdf364bd73730 Author: NARUSE, Yui AuthorDate: 2024-03-21 09:10:44 +0900 Commit: GitHub CommitDate: 2024-03-21 09:10:44 +0900 merge revision(s) 18ee7c9a108bf3424814565377c8796e5e455cf7,4a6384ed9358e8fb8464f6e37efb5477182f01db: [Backport #20246] (#10309) Clear all refined CCs on reopening refinement mod In cfd7729ce7a31c8b6ec5dd0e99c67b2932de4732 we started using inline caches for refinements. However, we weren't clearing inline caches when defined on a reopened refinement module. Fixes [Bug #20246] Fix [Bug #20246]: Don't set next_head_exact if a capture is called (#9897) commit b2c2702f20abfd4bb5f38cad60170e2bbb3adff9 Author: NARUSE, Yui AuthorDate: 2024-03-21 09:05:07 +0900 Commit: GitHub CommitDate: 2024-03-21 09:05:07 +0900 merge revision(s) 01fd262e62076277a41af72ea13f20deb1b462a2: [Backport #20245] (#10307) Fix crash when checking symbol encoding [Bug #20245] We sometimes pass in a fake string to sym_check_asciionly. This can crash if sym_check_asciionly raises because it creates a CFP with the fake string as the receiver which will crash if GC tries to mark the CFP. For example, the following script crashes: GC.stress = true Object.const_defined?("\xC3") commit 00cb72157a60c20a9b9d9fe81fc974ea83d672b4 Author: NARUSE, Yui AuthorDate: 2024-03-21 02:13:59 +0900 Commit: GitHub CommitDate: 2024-03-21 02:13:59 +0900 merge revision(s) 3e6e3ca2627b1aa71b17de902cc1b8188246a828: [Backport #20207] (#10299) Correctly handle consecutive lookarounds (#9738) Fix [Bug #20207] Fix [Bug #20212] Handling consecutive lookarounds in init_cache_opcodes is buggy, so it causes invalid memory access reported in [Bug #20207] and [Bug #20212]. This fixes it by using recursive functions to detected lookarounds nesting correctly. commit c626c201e4129bbea17583ecef73472c6f668c81 Author: NARUSE, Yui AuthorDate: 2024-03-20 22:40:50 +0900 Commit: GitHub CommitDate: 2024-03-20 22:40:50 +0900 merge revision(s) 01bfd1a2bf013a9ed92a9722ac5228187e05e6a8,1c120efe02d079b0a1dea573cf0fd7978d9cc857,31378dc0969f4466b2122d730b7298dd7004acdf: [Backport #20228] (#10301) Fix memory leak in OnigRegion when match raises [Bug #20228] rb_reg_onig_match can raise a Regexp::TimeoutError, which would cause the OnigRegion to leak. Fix memory leak in stk_base when Regexp timeout [Bug #20228] If rb_reg_check_timeout raises a Regexp::TimeoutError, then the stk_base will leak. Add memory leak test for Regexp timeout [Bug #20228] commit ce372be903e5f3597f1dc83cb558f165850b3bee Author: NARUSE, Yui AuthorDate: 2024-03-20 22:40:46 +0900 Commit: GitHub CommitDate: 2024-03-20 22:40:46 +0900 merge revision(s) ade56737e2273847426214035c0ff2340b43799a: [Backport #20190] (#10300) Fix coderange of invalid_encoding_string.<<(ord) Appending valid encoding character can change coderange from invalid to valid. Example: "\x95".force_encoding('sjis')<<0x5C will be a valid string "\x{955C}" commit 69cee6fee50f63cd52d59325dc3780a6fc4e5ae2 Author: NARUSE, Yui AuthorDate: 2024-03-20 20:05:31 +0900 Commit: GitHub CommitDate: 2024-03-20 20:05:31 +0900 merge revision(s) 771a2f039b9a059a73e8f111d1d46590fa697f63: [Backport #20213] (#10297) Fix incorrect use of VM_CALL_KW_SPLAT_MUT in zsuper with keyword splat For zsuper calls with a keyword splat but no actual keywords, the keyword splat is passed directly, so it cannot be mutable, because if the callee accepts a keyword splat, changes to the keyword splat by the callee would be reflected in the caller. While here, simplify the logic when the method supports literal keywords. I don't think it is possible for a method with has_kw param flags to not have keywords, so add an assertion for that, and set VM_CALL_KW_SPLAT_MUT in a single place. commit 0793cbbfde261f4fc9bf7045594d62a21e391811 Author: NARUSE, Yui AuthorDate: 2024-03-20 20:05:21 +0900 Commit: GitHub CommitDate: 2024-03-20 20:05:21 +0900 merge revision(s) ef276858d9295208add48e27208c69184dc50472: [Backport #20197] (#10296) Trigger postponed jobs on running_ec if that is available Currently, any postponed job triggered from a non-ruby thread gets sent to the main thread, but if the main thread is sleeping it won't be checking ints. Instead, we should try and interrupt running_ec if that's possible, and only fall back to the main thread if it's not. [Bug #20197] --- ractor.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 23bfe6218a690bbde5143e26bc6fb243347fb4b3 Author: NARUSE, Yui AuthorDate: 2024-03-20 20:05:08 +0900 Commit: GitHub CommitDate: 2024-03-20 20:05:08 +0900 merge revision(s) b14674b236445fb70f484603e678722760f678f4: [Backport #20194] (#10295) Memory leak with TracePoint on bmethod [Bug #20194] When disabling the TracePoint on bmethod, the hooks list is not freed. For example: obj = Object.new obj.define_singleton_method(:foo) {} bmethod = obj.method(:foo) tp = TracePoint.new(:return) {} 10.times do 100_000.times do tp.enable(target: bmethod) {} end puts `ps -o rss= -p #{$$}` end Before: 18208 22832 26528 29728 34000 37776 40864 44400 47680 51504 After: 16688 17168 17168 17248 17696 17760 17824 17824 17856 17920 --- test/ruby/test_settracefunc.rb | 13 +++++++++++++ vm_trace.c | 1 + 2 files changed, 14 insertions(+) commit 7ae8abc23961bf4fa143a7a2cc0bc38167d468ae Author: NARUSE, Yui AuthorDate: 2024-03-20 20:00:47 +0900 Commit: GitHub CommitDate: 2024-03-20 20:00:47 +0900 merge revision(s) bb59696614083660241ef272f222628cbfa95844: [Backport #20098] (#10298) Fix [Bug #20098]: set counter value for {n,m} repetition correctly (#9391) commit bd42c1725a3bba0f97831aa3dbaa6924f506a5f3 Author: KJ Tsanaktsidis AuthorDate: 2024-03-15 01:27:35 +0900 Commit: GitHub CommitDate: 2024-03-15 01:27:35 +0900 Backport #20096 to Ruby 3.3 (#9471) Fix memory overread in registry.rb The terminator is not actually getting filled in; we're simply passing (two) bytes of empty memory as the NUL terminator. This can lead to garbage characters getting written to registry values. Fix this by explicitly putting a WCHAR_NUL character into the string to be sent to the registry API, like we do in the MULTI_SZ case. [Bug #20096] commit 606dd03e9b0d4cf65ef56e52fab063e3ed5ef797 Author: KJ Tsanaktsidis AuthorDate: 2024-03-15 01:27:05 +0900 Commit: GitHub CommitDate: 2024-03-15 01:27:05 +0900 [Bug #20208] Revert "Set AI_ADDRCONFIG when making getaddrinfo(3) calls for outgoi… (#9791) Revert "Set AI_ADDRCONFIG when making getaddrinfo(3) calls for outgoing conns" This reverts commit 673ed41c81cf5a6951bcb2c3dec82d7bd6ea7440. commit 53f0c5a4e8834f11af0f903d2c59754d9be2a7f2 Author: Kerem Kat AuthorDate: 2024-03-15 01:26:35 +0900 Commit: GitHub CommitDate: 2024-03-15 01:26:35 +0900 Backport #9498 to Ruby 3.3 (#9805) Handle mmap failures for redblack tree cache The redblack tree cache is totally optional, so if we can't allocate room for the cache, then just pretend as if the cache is full if mmap fails Co-authored-by: Aaron Patterson commit cdcabd8a44ee2f4a2b549a3460a5c77c2dffca36 Author: Alan Wu AuthorDate: 2024-03-15 01:26:02 +0900 Commit: GitHub CommitDate: 2024-03-15 01:26:02 +0900 Backport 3.3: YJIT memory leak fix with additional CI fixes (#9841) merge revision(s) 2cc7a56e,b0711b1,db5d9429: [Backport #20209] YJIT: Avoid leaks by skipping objects with a singleton class For receiver with a singleton class, there are multiple vectors YJIT can end up retaining the object. There is a path in jit_guard_known_klass() that bakes the receiver into the code, and the object could also be kept alive indirectly through a path starting at the CME object baked into the code. To avoid these leaks, avoid compiling calls on objects with a singleton class. See: https://github.com/Shopify/ruby/issues/552 [Bug #20209] --- yjit/bindgen/src/main.rs | 1 + yjit/src/codegen.rs | 17 +++++++++++++++++ yjit/src/cruby_bindings.inc.rs | 1 + yjit/src/stats.rs | 2 ++ 4 files changed, 21 insertions(+) YJIT: Fix tailcall and JIT entry eating up FINISH frames (#9729) Suppose YJIT runs a rb_vm_opt_send_without_block() fallback and the control frame stack looks like: ``` will_tailcall_bar [FINISH] caller_that_used_fallback ``` will_tailcall_bar() runs in the interpreter and sets up a tailcall. Right before JIT_EXEC() in the `send` instruction, the stack will look like: ``` bar [FINISH] caller_that_used_fallback ``` Previously, JIT_EXEC() ran bar() in JIT code, which caused the `FINISH` flag to return to the interpreter instead of to the JIT code running caller_that_used_fallback(), causing code to run twice and probably crash. Recent flaky failures on CI about "each stub expects a particular iseq" are probably due to leaving methods twice in `test_optimizations.rb`. Only run JIT code from the interpreter if a new frame is pushed. --- test/ruby/test_optimization.rb | 11 +++++++++++ vm_exec.h | 3 ++- 2 files changed, 13 insertions(+), 1 deletion(-) YJIT: No need to RESTORE_REG now that we reject tailcalls Thanks to Kokubun for noticing. Follow-up: b0711b1cf152afad0a480ee2f9bedd142a0d24ac --- vm_exec.h | 1 - 1 file changed, 1 deletion(-) commit fafe5db7328eb3395ac4559992701b5f25ab49f4 Author: NARUSE, Yui AuthorDate: 2024-03-14 23:18:15 +0900 Commit: GitHub CommitDate: 2024-03-14 23:18:15 +0900 merge revision(s) b3d612804946e841e47d14e09b6839224a79c1a4: [Backport #20150] (#10253) Fix memory leak in grapheme clusters [Bug #20150] String#grapheme_cluters and String#each_grapheme_cluster leaks memory because if the string is not UTF-8, then the created regex will not be freed. For example: str = "hello world".encode(Encoding::UTF_32LE) 10.times do 1_000.times do str.grapheme_clusters end puts `ps -o rss= -p #{$$}` end Before: 26000 42256 59008 75792 92528 109232 125936 142672 159392 176160 After: 9264 9504 9808 10000 10128 10224 10352 10544 10704 10896 --- string.c | 98 +++++++++++++++++++++++++++++++----------------- test/ruby/test_string.rb | 11 ++++++ 2 files changed, 75 insertions(+), 34 deletions(-) commit 2a84aaf4a8c8d6d6bbb09416711922532b0033fe Author: NARUSE, Yui AuthorDate: 2024-03-14 18:55:52 +0900 Commit: GitHub CommitDate: 2024-03-14 18:55:52 +0900 Fix test session reuse but expire (#9824) (#10250) merge revision(s) 596db9c1f486d6609a4e97d82c8c71b54609fb6f: [Backport #20090] [Feature #19370] Blocks without anonymous parameters should not affect --- parse.y | 4 ++-- test/ruby/test_syntax.rb | 7 +++++++ 2 files changed, 9 insertions(+), 2 deletions(-) commit a889304fed63c3206f27d614ab75219271fb4ca9 Author: NARUSE, Yui AuthorDate: 2024-03-14 18:42:28 +0900 Commit: GitHub CommitDate: 2024-03-14 18:42:28 +0900 merge revision(s) 6c0e58a54e3fda604386d9c409e2a9998bbc9352: [Backport #20198] (#10252) Make sure the correct error is raised for EAI_SYSTEM resolver fail In case of EAI_SYSTEM, getaddrinfo is supposed to set more detail in errno; however, because we call getaddrinfo on a thread now, and errno is threadlocal, that information is being lost. Instead, we just raise whatever errno happens to be on the calling thread (which can be something very confusing, like `ECHILD`). Fix it by explicitly propagating errno back to the calling thread through the getaddrinfo_arg structure. [Bug #20198] --- ext/socket/raddrinfo.c | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) commit 72d04bb073e6897fb4228d5b0b31ad02cbb91036 Author: Hiroshi SHIBATA AuthorDate: 2023-12-26 15:05:20 +0900 Commit: NARUSE, Yui CommitDate: 2024-03-14 18:38:42 +0900 Disable to run appveyor anymore [Feature #19982] commit 8c4b5ac53b42b5bbbb279d17128b64ae685e7274 Author: Nobuyoshi Nakada AuthorDate: 2023-12-25 22:12:19 +0900 Commit: NARUSE, Yui CommitDate: 2024-03-14 18:38:42 +0900 Skip AppVeyor and GitHub if only other CI files are changed commit 577f9c7a8334bb33512f01e7db95f6fb15e280b2 Author: NARUSE, Yui AuthorDate: 2024-03-14 16:53:14 +0900 Commit: GitHub CommitDate: 2024-03-14 16:53:14 +0900 Backport 37ed86fd3c798e298fad9db6e7df1f3f45e1e03b (#10248) merge revision(s) 37ed86fd3c798e298fad9db6e7df1f3f45e1e03b: [Backport #--ticket=20161] Fix memory leak in regexp grapheme clusters [Bug #20161] The cc->mbuf gets overwritten, so we need to free it to not leak memory. For example: str = "hello world".encode(Encoding::UTF_32LE) 10.times do 1_000.times do str.grapheme_clusters end puts `ps -o rss= -p #{$$}` end Before: 15536 15760 15920 16144 16304 16480 16640 16784 17008 17280 After: 15584 15584 15760 15824 15888 15888 15888 15888 16048 16112 --- regparse.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit ade02f3c8909a8bf630af2c88f00b7bd7ff02682 Author: NARUSE, Yui AuthorDate: 2024-03-04 11:57:04 +0900 Commit: NARUSE, Yui CommitDate: 2024-03-04 11:57:04 +0900 merge revision(s) 051a874325c177e040301878069c2b28f5d06ce6: [Backport #20096] Fix memory overread in registry.rb The terminator is not actually getting filled in; we're simply passing (two) bytes of empty memory as the NUL terminator. This can lead to garbage characters getting written to registry values. Fix this by explicitly putting a WCHAR_NUL character into the string to be sent to the registry API, like we do in the MULTI_SZ case. [Bug #20096] --- ext/win32/lib/win32/registry.rb | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 3f0e3ede02f7d4b31c9073c9eb912f11aa4349cd Author: Takashi Kokubun AuthorDate: 2024-02-05 23:51:16 +0900 Commit: GitHub CommitDate: 2024-02-05 23:51:16 +0900 YJIT: Fix exits on splatkw instruction (#9715) [[Bug #20214]](https://bugs.ruby-lang.org/issues/20214) commit ac526abcd6d82545b8dc3586efb55d75f45f7417 Author: Hiroshi SHIBATA AuthorDate: 2024-02-05 23:51:04 +0900 Commit: GitHub CommitDate: 2024-02-05 23:51:04 +0900 Merge RubyGems 3.5.5 and Bundler 2.5.5 (#9676) * Merge RubyGems-3.5.4 and Bundler-2.5.4 * Merge RubyGems-3.5.5 and Bundler-2.5.5 * Make tests play with upstream Ruby tests CI broke in https://github.com/ruby/ruby/pull/9604 because if any Ruby tests run `require 'net/http'`, they will pollute the `$LOADED_FEATURES` for the RubyGems tests. We can fix this by renaming the test default gem from `net-http` to `my-http`. See https://github.com/rubygems/rubygems/pull/7379#issuecomment-1901241299 for more details. --------- Co-authored-by: Stan Hu commit 7f97e3540ce448b501bcbee15afac5f94bb22dd9 Author: Yuta Saito AuthorDate: 2024-02-05 23:50:20 +0900 Commit: GitHub CommitDate: 2024-02-05 23:50:20 +0900 [Backport 3.3] [Bug #20085] Use consistent default options for `-mbranch-protection` (#9385) [Bug #20085] Use consistent default options for `-mbranch-protection` We need to use the same options for both C compiler and assembler when `-mbranch-protection` is guessed by configure. Otherwise, `coroutine/arm64/Context.{h,S}` will use incompatible PAC strategies. commit 288d84d827da6cb8a56ed614a9839a06488986c0 Author: NARUSE, Yui AuthorDate: 2024-02-05 17:41:56 +0900 Commit: GitHub CommitDate: 2024-02-05 17:41:56 +0900 merge revision(s) 2554c5d3b8738a248cedb2fea96dfab9fbe19417: [Backport #20231] (#9831) Don't wait in `io_binwrite_string` if not necessary. (#9792) --- io.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit d7dc57a545d75c01313a9020b162ebb648a3ea18 Author: NARUSE, Yui AuthorDate: 2024-02-04 22:54:36 +0900 Commit: GitHub CommitDate: 2024-02-04 22:54:36 +0900 merge revision(s) c5cf4d4e129f64cb69aaf0a829aed068ef1943c4: [Backport#19542] (#9829) merge revision(s) c5cf4d4e129f64cb69aaf0a829aed068ef1943c4: [Backport #19542] Improve behavioural consistency of unallocated (zero length) `IO::Buffer`. (#9532) This makes the behaviour of IO::Buffer.new(0) and IO::Buffer.new.slice(0, 0) consistent. Fixes https://bugs.ruby-lang.org/issues/19542 and https://bugs.ruby-lang.org/issues/18805. --- io_buffer.c | 14 ++++++-------- test/ruby/test_io_buffer.rb | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+), 8 deletions(-) commit a065b68bd8d93505304f90bbb1855c864e17ad61 Author: Takashi Kokubun AuthorDate: 2024-02-04 14:37:33 +0900 Commit: GitHub CommitDate: 2024-02-04 14:37:33 +0900 Backport #9415 to ruby_3_3 (#9424) YJIT: Let RubyVM::YJIT.enable respect --yjit-stats commit ba16b340981942eda82d6328800b8098c452c0ca Author: Maxime Chevalier-Boisvert AuthorDate: 2024-02-04 14:36:34 +0900 Commit: GitHub CommitDate: 2024-02-04 14:36:34 +0900 YJIT: reduce default exec mem size to 48MiB (#9692) * YJIT: reduce default exec mem size to 48MiB based Based on user feedback from @jhawthorn and others. Better for small and memory-constrained deployments. NOTE: This commit should be included in the next Ruby 3.3.x point release. @xrxr should we tag someone specific? * YJIT: Update yjit.md about mem size (#9687) --------- Co-authored-by: Takashi Kokubun commit ce6863a0cf971e0c0328e3fc85b10b6de36ecbad Author: NARUSE, Yui AuthorDate: 2024-02-04 13:13:15 +0900 Commit: GitHub CommitDate: 2024-02-04 13:13:15 +0900 merge revision(s) 18573b8d054f655e3e8b24902985bf4028f88810: [Backport #20178] (#9822) Avoid reading unused lvars in Primitive.cexpr Previously on builds with optimizations disabled, this could result in an out of bounds read. When we had all of: * built with -O0 * Leaf builtin * Primitive.mandatory_only * "no args builtin", called by vm_call_single_noarg_inline_builti * The stack is escaped to the heap via binding or a proc This is because mk_builtin_loader generated reads for all locals regardless of whether they were used and in the case we generated a mandatory_only iseq that would include more variables than were actually available. On optimized builds, the invalid accesses would be optimized away, and this also was often unnoticed as the invalid access would just hit another part of the stack unless it had been escaped to the heap. The fix here is imperfect, as this could have false positives, but since Primitive.cexpr! is only available within the cruby codebase itself that's probably fine as a proper fix would be much more challenging (the only false positives we found were in rjit.rb). Fixes [Bug #20178] Co-authored-by: Adam Hess --- bootstraptest/test_method.rb | 9 +++++++++ tool/mk_builtin_loader.rb | 6 ++++++ 2 files changed, 15 insertions(+) commit 53d4e9c4bbba077a569549a01a8263e5e8f59ee8 Author: NARUSE, Yui AuthorDate: 2024-02-04 00:47:32 +0900 Commit: GitHub CommitDate: 2024-02-04 00:47:32 +0900 merge revision(s) 1bd98c820da46a05328d2d53b8f748f28e7ee8f7: [Backport #20172] (#9798) Remove setaffinity of pthread for getaddrinfo It looks like `sched_getcpu(3)` returns a strange number on some (virtual?) environments. I decided to remove the setaffinity mechanism because the performance does not appear to degrade on a quick benchmark even if removed. [Bug #20172] --- ext/socket/extconf.rb | 2 -- ext/socket/raddrinfo.c | 48 ++++-------------------------------------------- 2 files changed, 4 insertions(+), 46 deletions(-) commit 45064610725ddd81a5ea3775da35aa46985bc789 Author: NARUSE, Yui AuthorDate: 2024-02-03 22:35:44 +0900 Commit: GitHub CommitDate: 2024-02-03 22:35:44 +0900 Fix test session reuse but expire (#9824) * Show OpenSSL version in the error message of assert_equal * OpenSSL 3.2.1 30 Jan 2024 is also broken commit 3fb51b93d25b0566b71249b1c7ccddf0dab91429 Author: NARUSE, Yui AuthorDate: 2024-02-01 16:19:48 +0900 Commit: GitHub CommitDate: 2024-02-01 16:19:48 +0900 merge revision(s) 82b57d7bfeefd717c10f7a5a3484aca6b3e708a3: [Backport… (#9795) merge revision(s) 82b57d7bfeefd717c10f7a5a3484aca6b3e708a3: [Backport #20162] Fix memory leak when duplicating too complex object [Bug #20162] Creating a ST table then calling st_replace leaks memory because the st_replace overwrites the ST table without freeing any of the existing memory. This commit changes it to use st_copy instead. For example: RubyVM::Shape.exhaust_shapes o = Object.new o.instance_variable_set(:@a, 0) 10.times do 100_000.times { o.dup } puts `ps -o rss= -p #{$$}` end Before: 23264 33600 42672 52160 61600 71728 81056 90528 100560 109840 After: 14752 14816 15584 15584 15664 15664 15664 15664 15664 15664 --- object.c | 3 +-- test/ruby/test_shapes.rb | 13 +++++++++++++ 2 files changed, 14 insertions(+), 2 deletions(-) commit 7231fc5baa0a44ef6264c795071c5fbec8d1102d Author: NARUSE, Yui AuthorDate: 2024-02-01 16:13:50 +0900 Commit: GitHub CommitDate: 2024-02-01 16:13:50 +0900 merge revision(s) 597955a,8b65d15: [Backport #20173] (#9794) Fix to work match cache with peek next optimization (#9459) --- regexec.c | 3 ++- test/ruby/test_regexp.rb | 9 +++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) Fix test case for `test_match_cache_with_peek_optimization` (#9466) --- test/ruby/test_regexp.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 57d8d6e58a13c9de7bb84c1c76625789f435bca1 Author: Hiroshi SHIBATA AuthorDate: 2024-02-01 13:34:32 +0900 Commit: GitHub CommitDate: 2024-02-01 13:34:32 +0900 Backport bundled_gems.rb for Ruby 3.3 (#9457) racc is extracted at Ruby 3.3, not 3.4 commit 920c17dc94239baae05b513046b27967f11a3569 Author: KJ Tsanaktsidis AuthorDate: 2024-02-01 13:33:30 +0900 Commit: GitHub CommitDate: 2024-02-01 13:33:30 +0900 Backport #20157 to Ruby 3.3 (#9428) * Fix GC.measure_total_time regression Commit 93ac7405b80cc61930d73da04441fa09af1851e1 introduced a regression where measurements would still be taken after setting GC.measure_total_time = false. Fixes [Bug #20157] * Add test case for GC.measure_total_time --------- Co-authored-by: Rian McGuire commit 2886564279dff87a6c293f6e80436eb2b309967e Author: NARUSE, Yui AuthorDate: 2024-02-01 10:39:54 +0900 Commit: NARUSE, Yui CommitDate: 2024-02-01 10:39:54 +0900 merge revision(s) 6aacbd690ccde53f9b97c6673482cb11df3f2955: [Backport #20149] Free pthread_attr after setting up the thread [bug #20149] --- ext/socket/raddrinfo.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit aeffb5e21de6000a3dcfa0ca88c6ba3c3c42d8db Author: NARUSE, Yui AuthorDate: 2024-02-01 09:08:06 +0900 Commit: NARUSE, Yui CommitDate: 2024-02-01 09:08:06 +0900 merge revision(s) 6c252912af4981f016a9abdb4c1689307a4f1d2f: [Backport #20145] Memory leak when duplicating identhash [Bug #20145] Before this commit, both copy_compare_by_id and hash_copy will create a copy of the ST table, so the ST table created in copy_compare_by_id will be leaked. h = { 1 => 2 }.compare_by_identity 10.times do 1_000_000.times do h.select { false } end puts `ps -o rss= -p #{$$}` end Before: 110736 204352 300272 395520 460704 476736 542000 604704 682624 770528 After: 15504 16048 16144 16256 16320 16320 16752 16752 16752 16752 --- hash.c | 10 +++++++++- test/ruby/test_hash.rb | 10 ++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) commit f585171a6b1d6c20b3c162fd59dc874510ed2a49 Author: NARUSE, Yui AuthorDate: 2024-01-30 20:29:02 +0900 Commit: NARUSE, Yui CommitDate: 2024-01-30 20:29:02 +0900 merge revision(s) e12d4c654e3cb7a4473014610bc3bae41aaf811e: [Backport #20104] Don't create T_MATCH object if /regexp/.match(string) doesn't match Fixes [Bug #20104] --- re.c | 9 ++++++--- test/ruby/test_regexp.rb | 12 ++++++++++++ tool/lib/envutil.rb | 8 ++++++++ 3 files changed, 26 insertions(+), 3 deletions(-) commit f8f0d342e48a38caac6d32b438c145bb581a51e6 Author: NARUSE, Yui AuthorDate: 2024-01-30 18:57:00 +0900 Commit: NARUSE, Yui CommitDate: 2024-01-30 18:57:00 +0900 merge revision(s) 3d19409637de1462b6790d2a92344bf0a10d8c52: [Backport #20090] Use index for referring to symbols in `args` rule instead of named references In `args: args ',' arg_splat`, `args` is not unique name. Currently the associated rule is interpreted as `$$ = rest_arg_append(p, $$, $3, &@$);`. The action works as expected because `$$` is initialized with `$1` before each action is executed. However it's misleading then change to use index. --- parse.y | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9f18cbd7964f32f224e7d0efba79ee0476a442e0 Author: NARUSE, Yui AuthorDate: 2024-01-30 18:00:47 +0900 Commit: NARUSE, Yui CommitDate: 2024-01-30 18:00:47 +0900 Revert "merge revision(s) bc002971b6ad483dbf69b8a275c44412bb6ab954: [Backport #20094]" This reverts commit d4b780e84e9a6b858d0f6c6a44b22da0d2f5835e. commit d4b780e84e9a6b858d0f6c6a44b22da0d2f5835e Author: NARUSE, Yui AuthorDate: 2024-01-30 17:41:31 +0900 Commit: NARUSE, Yui CommitDate: 2024-01-30 17:41:31 +0900 merge revision(s) bc002971b6ad483dbf69b8a275c44412bb6ab954: [Backport #20094] [Bug #20094] Distinguish `begin` and parentheses --- compile.c | 1 + parse.y | 36 +++++++++++++++++++++--------------- test/ruby/test_whileuntil.rb | 18 ++++++++++++++++++ 3 files changed, 40 insertions(+), 15 deletions(-) commit 5f3dfa1c273c6fb9eae65ceca633b46f7e30f686 Author: NARUSE, Yui AuthorDate: 2024-01-30 10:31:15 +0900 Commit: NARUSE, Yui CommitDate: 2024-01-30 10:31:15 +0900 merge revision(s) d8702ddbfbe8cc7fc601a9a4d19842ef9c2b76c1: [Backport #20083] Fix [Bug #20083]: correct a cache point size for atomic groups (#9367) --- regexec.c | 2 +- test/ruby/test_regexp.rb | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) commit 818b4ea9b16e3570b431b86da9a24a5743b29617 Author: NARUSE, Yui AuthorDate: 2024-01-30 10:24:31 +0900 Commit: NARUSE, Yui CommitDate: 2024-01-30 10:24:31 +0900 merge revision(s) e5a4f757bdf5dc3d8c329ddd268432f9ecc7bff6: [Backport #20086] Fix Window private file mapping unlink EACCES issue. (#9358) * Don't return early. * Add missing `mapping` assignment. * Make debug logs conditional. --- io_buffer.c | 18 ++++++++++++------ test/ruby/test_io_buffer.rb | 32 ++++++++++++++------------------ 2 files changed, 26 insertions(+), 24 deletions(-) commit 634d4e29ef43e2fd113b361c069ffa8984e82362 Author: Hiroshi SHIBATA AuthorDate: 2024-01-05 22:54:57 +0900 Commit: GitHub CommitDate: 2024-01-05 22:54:57 +0900 Update net-* gems for Ruby 3.3 (#9418) * Bump up net-ftp to 0.3.4 * Bump up net-smtp to 0.4.0.1 * Bump up net-imap to 0.4.9.1 * [ruby/net-http] Renew test certificates The private key is replaced with a public known test key published at [RFC 9500]. Also lifetime has been extended to 10 years from 4 years. [RFC 9500]: https://www.rfc-editor.org/rfc/rfc9500.html https://github.com/ruby/net-http/commit/4ab6c4a500 * Bump up net-http to 0.4.1 --------- Co-authored-by: Sorah Fukumori commit 5124f9ac7513eb590c37717337c430cb93caa151 Author: NARUSE, Yui AuthorDate: 2023-12-25 14:59:38 +0900 Commit: NARUSE, Yui CommitDate: 2023-12-25 14:59:38 +0900 v3.3.0 commit a44a59dbaf1b5c930c9f476077b0be9b1653ad9c Author: Nobuyoshi Nakada AuthorDate: 2023-12-25 14:52:06 +0900 Commit: Nobuyoshi Nakada CommitDate: 2023-12-25 14:52:06 +0900 [DOC] Add NEWS for [Feature #19370] commit a9f096183170810ac6ce32b20d7810d11a51b5f5 Author: Nobuyoshi Nakada AuthorDate: 2023-12-23 18:07:37 +0900 Commit: Nobuyoshi Nakada CommitDate: 2023-12-25 14:44:04 +0900 [Feature #19370] Prohibit nesting anonymous parameter forwarding commit b641b7e640b90292e8091348ca05def0a16904a8 Author: Nobuyoshi Nakada AuthorDate: 2023-12-25 14:08:21 +0900 Commit: Nobuyoshi Nakada CommitDate: 2023-12-25 14:11:49 +0900 Move non-portable pragmas to rubyspec.h In the extension libraries in spec/ruby/optional/capi, do not care about deprecated declarations. commit 863ded45a18773742cf3adab0f6deb4ba6b47c6e Author: Hiroshi SHIBATA AuthorDate: 2023-12-25 13:48:26 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-25 13:50:23 +0900 Typofix under bootstraptest, spec and yjit directories commit 2cdbeb29e6e06d3492e2d4a388558ab883b07150 Author: Nobuyoshi Nakada AuthorDate: 2023-12-25 11:13:27 +0900 Commit: Nobuyoshi Nakada CommitDate: 2023-12-25 13:01:55 +0900 Do not leave test file Run this test separately because something seems remained unreleased on Windows. commit b4efa4b7005efee484e61fbc6af9c652fee36db2 Author: Peter Zhu AuthorDate: 2023-12-25 11:26:37 +0900 Commit: Peter Zhu CommitDate: 2023-12-25 12:13:49 +0900 Don't copy RUBY_FL_PROMOTED flag in rb_obj_setup RUBY_FL_PROMOTED is used by the garbage collector to track when an object becomes promoted to the old generation. rb_obj_setup must not copy that flag over because then it may become out-of-sync with the age of the object. This fixes a bug in Method#clone where the cloned Method object may get RUBY_FL_PROMOTED incorrectly set. commit 1b5f3dd6a1a5d054e3fd5af10b5dc2f49e1046fc Author: Hiroshi SHIBATA AuthorDate: 2023-12-25 12:04:28 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-25 12:04:28 +0900 Removed empty sections commit 27ead9907db12a6ff955cd86a15a62ff1f064392 Author: Hiroshi SHIBATA AuthorDate: 2023-12-25 11:32:03 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-25 11:32:42 +0900 Typofix under lib and test, tool directories commit 7002e776944ddfd362cea253d18d02bc250fe9f7 Author: Peter Zhu AuthorDate: 2023-12-25 09:22:13 +0900 Commit: Peter Zhu CommitDate: 2023-12-25 11:29:40 +0900 Fix Symbol#inspect for GC compaction The test fails when RGENGC_CHECK_MODE is turned on: 1) Failure: TestSymbol#test_inspect_under_gc_compact_stress [test/ruby/test_symbol.rb:123]: <":testing"> expected but was <":\x00\x00\x00\x00\x00\x00\x00">. commit e233730846fd2634208c3c568c49b76bf3b29a0b Author: Hiroshi SHIBATA AuthorDate: 2023-12-25 11:22:12 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-25 11:22:12 +0900 Partly reverted c903cddf55af1505a0779e1a131f2fe47b838260 These are intentional words commit c903cddf55af1505a0779e1a131f2fe47b838260 Author: Hiroshi SHIBATA AuthorDate: 2023-12-25 11:17:51 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-25 11:17:51 +0900 Typofix under doc directory commit 70618a48f7f9f12943e963bf121b56af4153f394 Author: Peter Zhu AuthorDate: 2023-12-25 06:23:10 +0900 Commit: Peter Zhu CommitDate: 2023-12-25 10:37:59 +0900 Fix off-by-one error for declarative marking The for loops for marking and reference updating declaratively marked TypedData objects did not mark/reference update the very last element. When RGENGC_CHECK_MODE is turned on, this caused the test in Enumerator to fail with: tool/lib/test/unit/testcase.rb:173:in `rescue in run': failed to allocate memory (NoMemoryError) commit 260bf60e52ffdfa625be1153624b0d123fc305f8 Author: Samuel Williams AuthorDate: 2023-12-25 10:20:53 +0900 Commit: GitHub CommitDate: 2023-12-25 10:20:53 +0900 Correctly release the underlying file mapping. (#9340) * Avoiding using `Tempfile` which was retaining the file preventing it from unlinking. commit 5af64ff7db3d636201db68b9ba995131a04a8f7b Author: Peter Zhu AuthorDate: 2023-12-25 02:10:10 +0900 Commit: Peter Zhu CommitDate: 2023-12-25 06:22:34 +0900 Fix Enumerator#with_index for GC compaction enumerator_block_call was not safe for compaction because the Array backing the argv was not pinned, so it could get moved during compaction which would make argv point to somewhere else. The test crashes when RGENGC_CHECK_MODE is turned on: TestEnumerator#test_with_index_under_gc_compact_stress check_rvalue_consistency: 0x55db0b399450 is not a Ruby object. test/ruby/test_enumerator.rb:133: [BUG] check_rvalue_consistency_force: there is 1 errors. ruby 3.3.0dev (2023-12-23T23:00:27Z master 50bf437341) [x86_64-linux] -- Control frame information ----------------------------------------------- c:0034 p:---- s:0192 e:000187 CFUNC :with_index c:0033 p:---- s:0185 e:000184 CFUNC :each c:0032 p:---- s:0182 e:000181 CFUNC :to_a c:0031 p:0055 s:0178 e:000175 BLOCK test/ruby/test_enumerator.rb:133 c:0030 p:0024 s:0172 e:000171 METHOD tool/lib/envutil.rb:242 c:0029 p:0024 s:0167 e:000166 METHOD tool/lib/envutil.rb:251 c:0028 p:0005 s:0160 e:000159 METHOD test/ruby/test_enumerator.rb:131 ... -- C level backtrace information ------------------------------------------- build/ruby(rb_print_backtrace+0x14) [0x55db0b1deb21] vm_dump.c:820 build/ruby(rb_vm_bugreport) vm_dump.c:1151 build/ruby(bug_report_end+0x0) [0x55db0b3a53a6] error.c:1042 build/ruby(rb_bug_without_die) error.c:1042 build/ruby(die+0x0) [0x55db0afc77c2] error.c:1050 build/ruby(rb_bug) error.c:1052 build/ruby(gc_move+0x0) [0x55db0afbada0] gc.c:1714 build/ruby(check_rvalue_consistency+0xa) [0x55db0afef0c3] gc.c:1729 build/ruby(is_markable_object) gc.c:4769 build/ruby(gc_mark_stack_values) gc.c:6595 build/ruby(rb_gc_mark_vm_stack_values) gc.c:6605 build/ruby(rb_execution_context_mark+0x39) [0x55db0b1d8589] vm.c:3309 build/ruby(thread_mark+0x15) [0x55db0b1a9805] vm.c:3381 build/ruby(gc_mark_stacked_objects+0x6d) [0x55db0aff2c3d] gc.c:7564 build/ruby(gc_mark_stacked_objects_all) gc.c:7602 build/ruby(gc_marks_rest) gc.c:8797 build/ruby(gc_marks+0xd) [0x55db0aff43d5] gc.c:8855 build/ruby(gc_start) gc.c:9608 build/ruby(rb_multi_ractor_p+0x0) [0x55db0aff5463] gc.c:9489 build/ruby(rb_vm_lock_leave) vm_sync.h:92 build/ruby(garbage_collect) gc.c:9491 build/ruby(newobj_slowpath+0xcb) [0x55db0aff57ab] gc.c:2871 build/ruby(newobj_slowpath_wb_protected) gc.c:2895 build/ruby(newobj_of0+0x24) [0x55db0aff59e4] gc.c:2937 build/ruby(newobj_of) gc.c:2947 build/ruby(rb_wb_protected_newobj_of) gc.c:2962 build/ruby(ary_alloc_embed+0x10) [0x55db0b2f3e40] array.c:668 build/ruby(ary_new) array.c:709 build/ruby(rb_ary_tmp_new_from_values) array.c:759 build/ruby(rb_ary_new_from_values) array.c:771 build/ruby(args_copy+0x18) [0x55db0b1bbb88] vm_args.c:158 commit 86ef38194bf2f5c854cab0adf29984594ee4a6ec Author: BurdetteLamar AuthorDate: 2023-12-25 04:26:07 +0900 Commit: Peter Zhu CommitDate: 2023-12-25 04:56:06 +0900 RDoc for complex.c commit f0efeddd41f96d3afae9af73a3dc594d86614f4b Author: Peter Zhu AuthorDate: 2023-12-24 23:08:01 +0900 Commit: Peter Zhu CommitDate: 2023-12-25 01:04:41 +0900 Fix Regexp#inspect for GC compaction rb_reg_desc was not safe for GC compaction because it took in the C string and length but not the backing String object so it get moved during compaction. This commit changes rb_reg_desc to use the string from the Regexp object. The test fails when RGENGC_CHECK_MODE is turned on: TestRegexp#test_inspect_under_gc_compact_stress [test/ruby/test_regexp.rb:474]: <"(?-mix:\\/)|"> expected but was <"/\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00/">. commit 8ad8803bb4aed01dfe56e42dc7c131b6bf307655 Author: BurdetteLamar AuthorDate: 2023-12-25 00:26:20 +0900 Commit: Peter Zhu CommitDate: 2023-12-25 01:00:30 +0900 RDoc for Complex commit 42442ed7891b1c721b4a306f21ce9548a69e7be3 Author: Peter Zhu AuthorDate: 2023-12-24 10:24:15 +0900 Commit: Peter Zhu CommitDate: 2023-12-24 23:03:55 +0900 Fix Regexp#match for GC compaction The test fails when RGENGC_CHECK_MODE is turned on: TestRegexp#test_match_under_gc_compact_stress: NoMethodError: undefined method `match' for nil test_regexp.rb:878:in `block in test_match_under_gc_compact_stress' commit 37753f163e461e157e6e224d9d3e5626427a50cc Author: Samuel Williams AuthorDate: 2023-12-24 22:03:36 +0900 Commit: GitHub CommitDate: 2023-12-24 22:03:36 +0900 IO::Buffer improvements and documentation. (#9329) * Restore experimental warnings. * Documentation and code structure improvements. * Improved validation of flags, clarified documentation of argument handling. * Remove inconsistent use of `Example:` and add example to `null?`. * Expose `IO::Buffer#private?` and add test. commit 61289d940597efb76bd7bcdd0501801733d9c9dd Author: Nobuyoshi Nakada AuthorDate: 2023-12-24 15:47:20 +0900 Commit: Nobuyoshi Nakada CommitDate: 2023-12-24 19:34:25 +0900 Initialize loop variable of `ccan_list_for_each` On platforms where `typeof` is unsupported, `ccan_container_off_var` calculates the offset of member by pointer subtraction. Although this will result in the compile-time invariant value regardless the pointer value, the loop variable will be used before assignment and may cause an using uninitialized variable warning. commit 86893b28f7ac7cc522d628577564d49a8f558d70 Author: git[bot] AuthorDate: 2023-12-24 15:58:23 +0900 Commit: git[bot] CommitDate: 2023-12-24 15:58:23 +0900 Update bundled gems list as of 2023-12-24 commit a87ae242bb460c7643d0f974b96489b5f73a2d45 Author: Koichi Sasada AuthorDate: 2023-12-24 14:33:14 +0900 Commit: Koichi Sasada CommitDate: 2023-12-24 15:13:33 +0900 Use noinline version of accessing current ec On universal.arm64e-darwin22 with clang 15.0.0 (I didn't check details yet) accessing `ruby_current_ec` directly causes assertion violation `VM_ASSERT(ec == rb_current_ec_noinline())` on `rb_current_execution_context()`, maybe because TLS accessing issue. commit 541371e286d2f139c49e7805f6f229618eb63144 Author: Koichi Sasada AuthorDate: 2023-12-24 14:20:35 +0900 Commit: Koichi Sasada CommitDate: 2023-12-24 14:53:46 +0900 accept `RB_WAITFD_IN | RB_WAITFD_OUT` for waiting events Assrsion was `events == RB_WAITFD_IN || events == RB_WAITFD_OUT` but it should accept `RB_WAITFD_IN | RB_WAITFD_OUT`. commit 0fef890b4fbe64a319247fee9d2cb13f45b76844 Author: Nobuyoshi Nakada AuthorDate: 2023-12-24 13:59:34 +0900 Commit: Nobuyoshi Nakada CommitDate: 2023-12-24 13:59:34 +0900 [DOC] Fix markup in HTML Inside HTML is not markdown. commit 82015496b924744ae3999987ba679978beb153c7 Author: Koichi Sasada AuthorDate: 2023-12-24 10:30:03 +0900 Commit: Koichi Sasada CommitDate: 2023-12-24 10:57:27 +0900 MN: access `timer_th.waiting` with lock `timer_th.waiting` should be protected by `timer_th.waiting_lock` commit daefbf8fbfa1bd2109315bab7658f52460f7ed59 Author: Daisuke Fujimura (fd0) AuthorDate: 2023-12-17 00:02:57 +0900 Commit: Nobuyoshi Nakada CommitDate: 2023-12-24 08:06:03 +0900 Use native_thread_init_stack on cygwin commit 50bf4373411a8780270c7ba1cc983d5756a4fde1 Author: Peter Zhu AuthorDate: 2023-12-24 06:22:14 +0900 Commit: Peter Zhu CommitDate: 2023-12-24 08:00:27 +0900 Fix String#sub for GC compaction The test fails when RGENGC_CHECK_MODE is turned on: TestString#test_sub_gc_compact_stress = 9.42 s 1) Failure: TestString#test_sub_gc_compact_stress [test/ruby/test_string.rb:2089]: <"aaa [amp] yyy"> expected but was <"aaa [] yyy">. commit a2ebf9cc63f0805bc7dd9a92e66bf589a869447e Author: JP Camara AuthorDate: 2023-12-23 10:28:55 +0900 Commit: Koichi Sasada CommitDate: 2023-12-24 07:07:11 +0900 Replicate EEXIST epoll_ctl behavior in kqueue * In the epoll implementation, you get an EEXIST if you try to register the same event for the same fd more than once for a particular epoll instance * Otherwise kevent will just override the previous event registration, and if multiple threads listen on the same fd only the last one to register will ever finish, the others are stuck * This approach will lead to native threads getting created, similar to the epoll implementation. This is not ideal, but it fixes certain test cases for now, like test/socket/test_tcp.rb#test_accept_multithread commit fadda88903d9fe764ae53eca07aaf85f08e162a7 Author: Peter Zhu AuthorDate: 2023-12-24 04:51:43 +0900 Commit: Peter Zhu CommitDate: 2023-12-24 06:52:05 +0900 Fix Regexp#to_s for GC compaction The test fails when RGENGC_CHECK_MODE is turned on: TestRegexp#test_to_s_under_gc_compact_stress = 13.46 s 1) Failure: TestRegexp#test_to_s_under_gc_compact_stress [test/ruby/test_regexp.rb:81]: <"(?-mix:abcd\u3042)"> expected but was <"(?-mix:\u5C78\u3030\u5C78\u3030\u5C78\u3030\u5C78\u3030\u5C78\u3030)">. commit 688a1314e60b0e58d5325f50c02552e3018c5025 Author: Burdette Lamar AuthorDate: 2023-12-24 06:08:26 +0900 Commit: GitHub CommitDate: 2023-12-24 06:08:26 +0900 [DOC] Clean up doc for File#flock (#9332) commit 47f33c38481d79563271f042946d0f3165d8b638 Author: Peter Zhu AuthorDate: 2023-12-23 23:51:30 +0900 Commit: Peter Zhu CommitDate: 2023-12-23 23:51:30 +0900 Remove useless `#if 1` in array.c commit fd3dede7f4bad52d7ab383eeb9ee29f20b045cb7 Author: Nobuyoshi Nakada AuthorDate: 2023-12-23 18:57:47 +0900 Commit: Nobuyoshi Nakada CommitDate: 2023-12-23 18:57:47 +0900 Fix for older set versions `Set::VERSION` was not defined in old set.rb bundled with ruby 3.2 or earlier. Also add comment for spec/mspec/tool/remove_old_guards.rb. commit dc7785e16ba54039d7341bba570ff551f146cf62 Author: Nobuyoshi Nakada AuthorDate: 2023-12-23 18:15:26 +0900 Commit: Nobuyoshi Nakada CommitDate: 2023-12-23 18:15:26 +0900 Set 1.1 now checks subclass-ness stricter commit f6e9899e8a84fc98d47d9c0faf59ff3f0684e1b4 Author: Nobuyoshi Nakada AuthorDate: 2023-12-23 01:54:35 +0900 Commit: Nobuyoshi Nakada CommitDate: 2023-12-23 18:03:31 +0900 Make rbconfig.rb loadable from exe/ruby So that it can run without `--disable=gems` option. commit 8c03bdacd180cc40b9dac2e6ab52ceb96b34bb18 Author: Nobuyoshi Nakada AuthorDate: 2023-12-23 01:51:23 +0900 Commit: Nobuyoshi Nakada CommitDate: 2023-12-23 18:03:30 +0900 Control the precheck for test-all by `PRECHECK_TEST_ALL` commit 40bc7ede38f87bfdd768ed277631b240bd0632b4 Author: Akinori MUSHA AuthorDate: 2023-12-23 16:51:41 +0900 Commit: Akinori MUSHA CommitDate: 2023-12-23 16:51:41 +0900 Set 1.1.0 has been imported commit c66ff6facedc693622132a343425ff878a163262 Author: Akinori MUSHA AuthorDate: 2023-12-23 16:43:37 +0900 Commit: Akinori MUSHA CommitDate: 2023-12-23 16:50:33 +0900 [ruby/set] Bump version to 1.1.0 https://github.com/ruby/set/commit/d6cab5bcc8 commit 67882d7695552202c47a62bae12e8a774f9e64ea Author: Akinori MUSHA AuthorDate: 2023-12-08 22:20:14 +0900 Commit: Akinori MUSHA CommitDate: 2023-12-23 16:50:31 +0900 [ruby/set] Use the pattern argument instead of a block https://github.com/ruby/set/commit/c63047c2ce commit 6fc3171e8af966c680664791b05fa9d505c95d19 Author: Akinori MUSHA AuthorDate: 2023-12-08 22:18:25 +0900 Commit: Akinori MUSHA CommitDate: 2023-12-23 16:50:30 +0900 [ruby/set] The arity of initialize_clone is -1 in Ruby >= 3 https://github.com/ruby/set/commit/32a9689696 commit 271c74a473b4fa2cdd754865882ba9912b58541c Author: Akinori MUSHA AuthorDate: 2023-12-08 22:09:22 +0900 Commit: Akinori MUSHA CommitDate: 2023-12-23 16:50:29 +0900 [ruby/set] Drop support for Ruby 2 https://github.com/ruby/set/commit/64dad673d8 commit da02d08f2793c1c5d2ce084d6ceb6fa58ed641f2 Author: Takashi Kokubun AuthorDate: 2023-12-23 15:17:58 +0900 Commit: Takashi Kokubun CommitDate: 2023-12-23 15:18:14 +0900 RJIT: Rewind $! after compilation commit ef065102653378956f579985d10d3d4816dc87cf Author: Takashi Kokubun AuthorDate: 2023-12-23 14:47:35 +0900 Commit: Takashi Kokubun CommitDate: 2023-12-23 14:48:26 +0900 RJIT: Prefer STDERR over $stderr When $stderr is redirected, you'll have no way to see why RJIT got broken. This reference must always be the actual stderr. commit c25705c2670ab34a2d4c993436edcf7d77e5cd92 Author: Takashi Kokubun AuthorDate: 2023-12-23 13:20:03 +0900 Commit: Takashi Kokubun CommitDate: 2023-12-23 13:20:42 +0900 Get rid of obsoleted RJITFirst It was renamed from test_mjit, but we did not maintain it as test_rjit. We test RJIT very differently. commit 9b289d58f78e80362984ffb2920e859beeaec2ce Author: Burdette Lamar AuthorDate: 2023-12-23 12:31:18 +0900 Commit: GitHub CommitDate: 2023-12-23 12:31:18 +0900 [DOC] RDoc for Complex (#9307) commit f1b7424cbed00a27532a053949f524eaaf4be1ba Author: John Hawthorn AuthorDate: 2023-12-23 05:15:22 +0900 Commit: John Hawthorn CommitDate: 2023-12-23 11:07:22 +0900 FREE_AT_EXIT: Don't free main stack post-fork When a forked process was started in a thread, this would result in a double-free during the child process exit. RUBY_FREE_AT_EXIT=1 ./miniruby -e 'Thread.new { fork { } }.join; Process.waitpid' This is because the main thread in the forked process was not the initial VM thread, and the new thread's stack was freed as part of objectspace iteration. This change also allows rb_threadptr_root_fiber_release to run without EC being available. commit 339978ef3869acb2ff877451381a80ee4b548bfb Author: John Hawthorn AuthorDate: 2023-12-23 05:15:07 +0900 Commit: John Hawthorn CommitDate: 2023-12-23 11:07:22 +0900 Free default_rand_key after freeing Ractors Ractor's free iterates through its TLS keys so we need to keep this memory available until after Ractors are freed. Minimal reproduction: RUBY_FREE_AT_EXIT=1 ./miniruby -e rand commit 697a096c9b0d8c153cb5d99affb6b5673b7c4210 Author: John Hawthorn AuthorDate: 2023-12-16 18:34:03 +0900 Commit: John Hawthorn CommitDate: 2023-12-23 11:07:22 +0900 Remove EC argument from clean_hooks_check This argument doesn't seem used anymore. Since we want to free these objects during VM destruction when RUBY_FREE_AT_EXIT is set they must work without an EC. This avoids a use-after-free running `RUBY_FREE_AT_EXIT=1 ./miniruby -e ''` commit 7d7a84e99fca816ec352c95965687db240fb56d3 Author: Hiroshi SHIBATA AuthorDate: 2023-12-23 09:08:54 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-23 09:34:26 +0900 Merge RubyGems-3.5.3 and Bundler-2.5.3 commit fa5de8f68d51e4fbc91190061e3ce3817bd68964 Author: Koichi Sasada AuthorDate: 2023-12-23 07:46:56 +0900 Commit: Koichi Sasada CommitDate: 2023-12-23 08:10:41 +0900 MN: skip waiting on fiber schedulers If the Fiber is nonblocking mode, fiber scheduler needs to handle IO events. commit beec3d07c907ec875e05fe2d22cea2263857b499 Author: Koichi Sasada AuthorDate: 2023-12-23 07:45:08 +0900 Commit: Koichi Sasada CommitDate: 2023-12-23 08:10:41 +0900 MN: skip waiting on `read_nonblock' if the IO for `IO#read_nonblock` is not ready, it needs to return (or raise) immediately. commit 2fe9e08578689adec0be8a36d0ae49541551d357 Author: Koichi Sasada AuthorDate: 2023-12-23 07:44:36 +0900 Commit: Koichi Sasada CommitDate: 2023-12-23 08:10:41 +0900 MN: skip RUBY_DESCRIPTION spec on MN enabled commit a4b737213eb1d8f352f1f148c27e96a3f09f5d08 Author: Koichi Sasada AuthorDate: 2023-12-23 05:23:53 +0900 Commit: Koichi Sasada CommitDate: 2023-12-23 05:56:02 +0900 MN: ceil timeout milli seconds `hrrel / RB_HRTIME_PER_MSEC` floor the timeout value and it can return wrong value by `Mutex#sleep` (return Integer even if it should return nil (timeout'ed)). This patch ceil the value and the issue was solved. commit c974ee1abe5df5a4bb97264e608afbd134c77652 Author: Koichi Sasada AuthorDate: 2023-12-23 05:22:52 +0900 Commit: Koichi Sasada CommitDate: 2023-12-23 05:56:02 +0900 ensure to restart antoher thread commit bbfc262c994f84801abfb1302cf6142dfee50adf Author: Koichi Sasada AuthorDate: 2023-12-23 03:57:53 +0900 Commit: Koichi Sasada CommitDate: 2023-12-23 05:56:02 +0900 MN: fix "raise on close" Introduce `thread_io_wait_events()` to make 1 function to call `thread_sched_wait_events()`. In ``thread_io_wait_events()`, manipulate `waiting_fd` to raise an exception when closing the IO correctly. commit 19d082dcfa393e8a5d0282b872ace587ca5cd49a Author: Takashi Kokubun AuthorDate: 2023-12-23 04:20:45 +0900 Commit: Takashi Kokubun CommitDate: 2023-12-23 04:24:04 +0900 RJIT: Distinguish Pointer with Array This is more convenient for accessing those fields. commit 40e3f782dd92749a1fa593ef905d1b75fdd61904 Author: Nobuyoshi Nakada AuthorDate: 2023-12-22 21:50:38 +0900 Commit: Nobuyoshi Nakada CommitDate: 2023-12-22 23:08:10 +0900 Extract `forwarding_arg_check` function commit 11c2aa035b0639a2b3550cd8e0b9ef72315f0c2d Author: Nobuyoshi Nakada AuthorDate: 2023-12-22 16:30:46 +0900 Commit: Nobuyoshi Nakada CommitDate: 2023-12-22 23:08:10 +0900 Extract `arg_splat` nonterminal symbol commit 426f2334dd4a926782ffac32ad9c6c01abf220b8 Author: Jun Aruga AuthorDate: 2023-12-22 22:26:22 +0900 Commit: Jun Aruga CommitDate: 2023-12-22 23:06:47 +0900 .travis.yml: Try another way to be notified. I haven't received the notifications since August 2022. So, try another way to be notified written on the document below. https://docs.travis-ci.com/user/notifications/#configuring-email-notifications commit e8639098ed78f8f8f7c263d8b6f2d68822945a78 Author: Kouhei Yanagita AuthorDate: 2023-10-29 14:57:50 +0900 Commit: Nobuyoshi Nakada CommitDate: 2023-12-22 16:15:33 +0900 [Bug #19977] Fix (nil..nil) === x not to raise TypeError commit f263e447460eb952738f0318ca4e8dee4f4139a5 Author: Takashi Kokubun AuthorDate: 2023-12-22 15:57:32 +0900 Commit: Takashi Kokubun CommitDate: 2023-12-22 16:00:18 +0900 RJIT: Avoid retaining unrelated local variables in memory commit ef4797bb0338aa35dd74290dcfef83cbc288ad58 Author: Kouhei Yanagita AuthorDate: 2023-12-22 15:44:57 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-22 15:53:41 +0900 [DOC] Fix NEWS markup commit 17e351057ea39acbc19fa3f17ba668a3ba31421e Author: TSUYUSATO Kitsune AuthorDate: 2023-12-22 15:03:18 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-22 15:28:33 +0900 Add Regexp updates to NEWS.md commit e364436c5f89fc4ee51706634637893771175d02 Author: yui-knk AuthorDate: 2023-12-22 09:32:32 +0900 Commit: yui-knk CommitDate: 2023-12-22 15:15:05 +0900 [DOC] NEWS entries for Parser commit f3c82df944603a590771c83e1e58c51f83eb63cf Author: Takashi Kokubun AuthorDate: 2023-12-22 14:59:32 +0900 Commit: Takashi Kokubun CommitDate: 2023-12-22 14:59:33 +0900 RJIT: Minimize string allocations in InsnCompiler commit 2e0277b133b9040808f45d0ec9930a0fd7422c3b Author: Takashi Kokubun AuthorDate: 2023-12-22 14:25:08 +0900 Commit: Takashi Kokubun CommitDate: 2023-12-22 14:46:19 +0900 RJIT: Make --rjit-trace actually work commit 4c6f07eeca54df45cbdd1ab83eafc5a9343482d4 Author: Takashi Kokubun AuthorDate: 2023-12-22 14:10:19 +0900 Commit: Takashi Kokubun CommitDate: 2023-12-22 14:10:19 +0900 RJIT: Update bindgen commit 64c52cd1c2df840a021dd952b42bddde09534b1b Author: Takashi Kokubun AuthorDate: 2023-12-22 13:57:34 +0900 Commit: Takashi Kokubun CommitDate: 2023-12-22 14:05:13 +0900 RJIT: Add --rjit-trace to allow TracePoint during JIT commit c18edc5b5d03b9abf355038a17956d69e0552228 Author: John Hawthorn AuthorDate: 2023-12-22 09:01:16 +0900 Commit: John Hawthorn CommitDate: 2023-12-22 13:43:01 +0900 Avoid underflow of rb_yjit_live_iseq_count This value is only incremented when rb_iseq_translate_threaded_code is called, which doesn't happen for iseqs which result in a syntax error. This is easy to hit by running a debug build with RUBY_FREE_AT_EXIT=1, but any build and options could underflow this value by running enough evals. commit cae11dd8576d9ddb9bead2e5340677c5d05b03f5 Author: Koichi Sasada AuthorDate: 2023-12-22 12:15:44 +0900 Commit: Koichi Sasada CommitDate: 2023-12-22 12:45:31 +0900 debug.gem v1.9.1 commit fa0f7522c41bd2a71117b2428bc6fbb0bbcc9699 Author: Yuta Saito AuthorDate: 2023-12-22 08:52:20 +0900 Commit: Yuta Saito CommitDate: 2023-12-22 11:30:00 +0900 coroutine/arm64: Skip saving/restoring x30 twice and use `autiasp` We don't need to save/restore x30 twice, and we can just use `ret`, which uses x30 as return address register instead of explicit `ret ` instruction. This also allows us to use `autiasp` instead of `autia1716` and we can skip setting SP/LR to x16/x17. Also the size of register save area is shrunk by 16 bytes due to the removal of extra x30 save/restore. commit 2d004decde80566c5b004c5b832e8a1ab007965f Author: Yuta Saito AuthorDate: 2023-12-21 15:21:37 +0900 Commit: Yuta Saito CommitDate: 2023-12-22 11:30:00 +0900 coroutine/arm64/Context.S: Append PAC/BTI note section if needed Fixes https://bugs.ruby-lang.org/issues/20029 commit 35587150e21175b6a63cd02d406beff5c76f1149 Author: Yuta Saito AuthorDate: 2023-12-21 15:19:25 +0900 Commit: Yuta Saito CommitDate: 2023-12-22 11:30:00 +0900 coroutine/arm64/Context.S: Insert `bti c` as BTI landing pad commit d9e5564ccd0e460b7685b786d21cf386b229e2a9 Author: Yuta Saito AuthorDate: 2023-12-21 14:42:39 +0900 Commit: Yuta Saito CommitDate: 2023-12-22 11:30:00 +0900 coroutine/arm64: Sign return address if PAC enabled commit 9a3c49ee5d6dd3770c21ed8193e7efd64cd81a6e Author: Takashi Kokubun AuthorDate: 2023-12-22 10:45:43 +0900 Commit: Takashi Kokubun CommitDate: 2023-12-22 10:47:36 +0900 RJIT: Convert opt_case_dispatch keys with #to_value comptime_key is a Ruby object and the value is not valid in machine code. This PR also implements `CMP r/m64, imm32 (Mod 01: [reg]+disp8)` that is now needed for running mail.gem benchmark. commit 009968a700209336eb592ccb83bddcf7b2c17984 Author: Takashi Kokubun AuthorDate: 2023-12-22 10:12:40 +0900 Commit: Takashi Kokubun CommitDate: 2023-12-22 10:12:40 +0900 RJIT: Avoid incrementing vm_insns_count during compilation commit 3c182776292ecd2a28fea4f7de87a89e64459f9c Author: Takashi Kokubun AuthorDate: 2023-12-22 09:18:30 +0900 Commit: Takashi Kokubun CommitDate: 2023-12-22 09:47:13 +0900 RJIT: Clean up unnecessary documentation commit 18a97affa349b5edbc4829063b752aab1911fa55 Author: Takashi Kokubun AuthorDate: 2023-12-22 09:45:37 +0900 Commit: Takashi Kokubun CommitDate: 2023-12-22 09:45:37 +0900 RJIT: Fix a wrong comparison in set_local_type commit 68bcca4c2bfa716b965554057b098cefcba00f66 Author: Takashi Kokubun AuthorDate: 2023-12-22 08:45:10 +0900 Commit: Takashi Kokubun CommitDate: 2023-12-22 08:48:37 +0900 RJIT: Fix unwanted shadowing in set_local_type local_idx should not be overwritten. commit ffa5f16273f46c97bfca56e4549b0b38b9322d63 Author: John Hawthorn AuthorDate: 2023-12-21 06:54:32 +0900 Commit: John Hawthorn CommitDate: 2023-12-22 08:23:19 +0900 Make rb_profile_frames return 0 for NULL ec When using M:N threads, EC is set to NULL in the shared native thread when nothing is scheduled. This previously caused a segfault when we try to examine the EC. Returning 0 instead means we may miss profiling information, but a profiler relying on this isn't thread aware anyways, and observing that "nothing" is running is probably correct. Fixes [Bug #20017] Co-authored-by: Dustin Brown commit 78b27ce62a7d6f28c73d6fb4f97b0948859be8e0 Author: Takashi Kokubun AuthorDate: 2023-12-22 07:30:55 +0900 Commit: Takashi Kokubun CommitDate: 2023-12-22 07:32:03 +0900 RJIT: Streamline RJIT enablement check in bootstrap tests so that `make btest-bruby` skips the right tests. commit c73959cff40ba0f1d71ea6e3fce19b5f287e8494 Author: Takashi Kokubun AuthorDate: 2023-12-22 07:24:10 +0900 Commit: Takashi Kokubun CommitDate: 2023-12-22 07:25:41 +0900 RJIT: Rename pause/resume to disable/enable like YJIT. They don't work in the same way yet, but it's nice to make the naming consistent first so that we will not need to rename them later. commit 82496f2b389278a569fa7680ee6faa55a97410d7 Author: Hiroshi SHIBATA AuthorDate: 2023-12-22 07:01:12 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-22 07:24:04 +0900 Merge RubyGems-3.5.2 and Bundler-2.5.2 commit fc549b2b3a65a95a734ee8679293a30284f84622 Author: Victor Shepelev AuthorDate: 2023-12-22 06:12:36 +0900 Commit: GitHub CommitDate: 2023-12-22 06:12:36 +0900 [DOC] Improve NEWS.md rendering and add missing features (#9308) * Fix rendering of the file on docs.ruby-lang.org: * More indentation for code; * Properly qualified methods to link to docs; * Add two minor yet notable changes: * Time.new stricter parsing of strings; * NoMethodError rendering logic change. commit e04197aba74e62aae163f0cdc7058861047045a2 Author: Victor Shepelev AuthorDate: 2023-12-22 05:27:18 +0900 Commit: GitHub CommitDate: 2023-12-22 05:27:18 +0900 [DOC] Fix NoMethodError example of rendering (#9309) Fix NoMethodError example of rendering commit 1f0304218cf00e05a4a126196676ba221ebf91f6 Author: John Hawthorn AuthorDate: 2023-12-21 08:29:03 +0900 Commit: John Hawthorn CommitDate: 2023-12-22 02:17:22 +0900 Use main_thread->ec from rb_vm_main_ractor_ec rb_vm_main_ractor_ec was introduced to allow rb_postponed_job_* to work when fired on non-Ruby threads, which have no EC set, and that is its only use. When RUBY_MN_THREADS=1 is set ractor->threads.running_ec is NULL when the shared thread is sleeping. This instead grabs the EC directly from the main thread which seems to always be set. Fixes [Bug #20016] Co-authored-by: Dustin Brown commit 1710eb9367d7d11f059a17879e00ef7637265558 Author: John Hawthorn AuthorDate: 2023-12-21 03:37:02 +0900 Commit: John Hawthorn CommitDate: 2023-12-22 02:17:22 +0900 [DOC] Fix rb_postponed_job_register_once typo Co-authored-by: Dustin Brown commit e191bf42d2077a025c21888573f8b81688e5ea28 Author: Peter Zhu AuthorDate: 2023-12-19 10:55:59 +0900 Commit: Peter Zhu CommitDate: 2023-12-22 00:39:03 +0900 Fix ary_make_partial_step for compaction ary could change embeddedness due to compaction, so we should only get the pointer after allocations. The included test was crashing with: TestArray#test_slice_gc_compact_stress ruby/lib/pp.rb:192: [BUG] Segmentation fault at 0x0000000000000038 commit fd4735130e5fdc0a11f970092d5900847a3ce4cf Author: Jean Boussier AuthorDate: 2023-12-21 20:20:41 +0900 Commit: Jean Boussier CommitDate: 2023-12-21 21:02:25 +0900 Fix a typo in NEWS.md commit bcb4706dac321bef018a28c83721609a20143351 Author: Hiroshi SHIBATA AuthorDate: 2023-12-21 14:16:09 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-21 14:16:09 +0900 Added limitation of bundled gems warning feature with bootsnap commit d587852cf7f660308d1287e85767ada3559a3ff9 Author: Soutaro Matsumoto AuthorDate: 2023-12-21 10:26:08 +0900 Commit: GitHub CommitDate: 2023-12-21 10:26:08 +0900 Bundle RBS 3.4.0 (#9293) Bundle RBS 3.4.0 and TypeProf 0.21.9. commit c28177cd57c99865bbf18e73008ba6fb11f73a2e Author: Takashi Kokubun AuthorDate: 2023-12-21 02:17:19 +0900 Commit: Takashi Kokubun CommitDate: 2023-12-21 02:17:46 +0900 RJIT: Print an error message first Creating a backtrace can crash if RJIT is triggered by branch_stub_hit. In that case, it's useful to at least print the error message. commit 31959f1f13c0dcbb517469b4cbf29a637a7c6ee4 Author: Stan Lo AuthorDate: 2023-12-20 19:04:53 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-20 19:11:02 +0900 [ruby/irb] Bump version to v1.11.0 (https://github.com/ruby/irb/pull/818) https://github.com/ruby/irb/commit/7421359b92 commit 4ad1007fd2da863e3afc8bd83b38c512f9ca7fc4 Author: Burdette Lamar AuthorDate: 2023-12-19 08:26:43 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-20 19:11:02 +0900 [ruby/irb] [DOC] Change indexes.rdoc to indexes.md (https://github.com/ruby/irb/pull/812) * Change indexes.rdoc to indexes.md * Change indexes.rdoc to indexes.md * Change indexes.rdoc to indexes.md https://github.com/ruby/irb/commit/b1cd53cbf7 commit 2793a30b69177e7c7bbf124ccfca7b4f4216ca84 Author: Stan Lo AuthorDate: 2023-12-18 23:36:55 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-20 19:11:01 +0900 [ruby/irb] Warn users about errors in loading RC files (https://github.com/ruby/irb/pull/817) 1. Because `IRB.rc_file` always generates an rc file name, even if the file doesn't exist, we should check the file exists before trying to load it. 2. If any type of errors occur while loading the rc file, we should warn the user about it. https://github.com/ruby/irb/commit/37ffdc6b19 commit 7c2d8198625ca2e38835ad06ab47b4ea3afbc34b Author: Jean Boussier AuthorDate: 2023-12-20 17:05:44 +0900 Commit: Jean Boussier CommitDate: 2023-12-20 17:28:45 +0900 Fix a grammar issue in the shape performance warning message commit 4927f251481df57a209284bb2ad2b237468e7792 Author: Koichi Sasada AuthorDate: 2023-12-20 15:48:49 +0900 Commit: Koichi Sasada CommitDate: 2023-12-20 17:00:55 +0900 skip `MAP_STACK` on FreeBSD commit 256f34ab6b221b630e5e4ec8d39e3808e82a3296 Author: JP Camara AuthorDate: 2023-12-16 12:39:45 +0900 Commit: Koichi Sasada CommitDate: 2023-12-20 16:23:38 +0900 Hand thread into `thread_sched_wait_events_timeval` * When we have the thread already, it saves a lookup * `event_wait`, not `kq` Clean up the `thread_sched_wait_events_timeval` calls * By handling the PTHREAD check inside the function, all the other code can become much simpler and just call the function directly without additional checks commit 8782e02138e6fe18b6c0dcc29bb877d6cdae57e5 Author: JP Camara AuthorDate: 2023-12-07 10:01:14 +0900 Commit: Koichi Sasada CommitDate: 2023-12-20 16:23:38 +0900 KQueue support for M:N threads * Allows macOS users to use M:N threads (and technically FreeBSD, though it has not been verified on FreeBSD) * Include sys/event.h header check for macros, and include sys/event.h when present * Rename epoll_fd to more generic kq_fd (Kernel event Queue) for use by both epoll and kqueue * MAP_STACK is not available on macOS so conditionall apply it to mmap flags * Set fd to close on exec * Log debug messages specific to kqueue and epoll on creation * close_invalidate raises an error for the kqueue fd on child process fork. It's unclear rn if that's a bug, or if it's kqueue specific behavior Use kq with rb_thread_wait_for_single_fd * Only platforms with `USE_POLL` (linux) had changes applied to take advantage of kernel event queues. It needed to be applied to the `select` so that kqueue could be properly applied * Clean up kqueue specific code and make sure only flags that were actually set are removed (or an error is raised) * Also handle kevent specific errnos, since most don't apply from epoll to kqueue * Use the more platform standard close-on-exec approach of `fcntl` and `FD_CLOEXEC`. The io-event gem uses `ioctl`, but fcntl seems to be the recommended choice. It is also what Go, Bun, and Libuv use * We're making changes in this file anyways - may as well fix a couple spelling mistakes while here Make sure FD_CLOEXEC carries over in dup * Otherwise the kqueue descriptor should have FD_CLOEXEC, but doesn't and fails in assert_close_on_exec commit 7ef90b3978dad057ad6360a94d2d64e8ca5e9c38 Author: HParker AuthorDate: 2023-12-20 14:12:18 +0900 Commit: Yusuke Endoh CommitDate: 2023-12-20 14:36:32 +0900 Correct free_on_exit env var to free_at_exit commit 7dca6b53a995a9782026f726c291344b5b8e0ab2 Author: Jeremy Evans AuthorDate: 2023-12-20 14:30:47 +0900 Commit: GitHub CommitDate: 2023-12-20 14:30:47 +0900 Add tool/missing-baseruby.bat, used when BASERUBY not available Previously, the embedded semicolon in BASERUBY if BASERUBY is not available breaks tarball builds without BASERUBY when using OpenBSD make, due to the inability to escape MFLAGS correctly. This moves the same BASERUBY code into a separate file, avoiding the MFLAGS quoting issue. BASERUBY must be passed to build-ext because it is required by ripper since the introduction of lrama. Fixes [Bug #19683] Co-authored-by: Nobuyoshi Nakada commit ae2c4d07204dd714a7a5be7697541447b023ea25 Author: Mikhail Doronin AuthorDate: 2023-12-19 05:13:47 +0900 Commit: Nobuyoshi Nakada CommitDate: 2023-12-20 13:46:39 +0900 Revert "[Bug #19831] Remove duplicate library options" This reverts commit 5bb946228550c7f171c27725860b153a675404f3. Fixes https://bugs.ruby-lang.org/issues/20072 commit 32ecda354f1556edbfdba4723716fa523acbc94d Author: Peter Zhu AuthorDate: 2023-12-19 06:55:19 +0900 Commit: Peter Zhu CommitDate: 2023-12-20 08:29:36 +0900 Support `GC.auto_compact = :empty` on debug builds This commit adds `GC.auto_compact = :empty` which will run auto-compaction sorting pages by empty slots so the most amount of objects will be moved. This will make it easier to write tests for auto-compaction. commit 3d984366ca809fdcc9320e776705ecd96efa49a0 Author: Matt Valentine-House AuthorDate: 2023-12-20 07:06:50 +0900 Commit: Matt Valentine-House CommitDate: 2023-12-20 07:50:59 +0900 [PRISM] Correct the jump target for redo in FOR_NODE commit 371ff808400b079b373e87de9b3deeb6c16f6a23 Author: Matt Valentine-House AuthorDate: 2023-12-19 06:32:25 +0900 Commit: Matt Valentine-House CommitDate: 2023-12-20 07:50:59 +0900 [PRISM] Fix parameter numbering in For Node commit f0b86f8c6098edfe47c4735d061e50e017d7e94d Author: BurdetteLamar AuthorDate: 2023-12-20 05:32:54 +0900 Commit: Peter Zhu CommitDate: 2023-12-20 07:29:09 +0900 RDoc for Complex commit 054f56fd3e5bf84e5443896fd1f4e439c2773c60 Author: Koichi Sasada AuthorDate: 2023-12-20 03:45:41 +0900 Commit: Koichi Sasada CommitDate: 2023-12-20 07:04:32 +0900 moved object should not have a shape ID fix [Bug #19917] commit 7a0dfdea8c92d2393d624bc7961f36e082c43471 Author: Koichi Sasada AuthorDate: 2023-12-20 06:15:15 +0900 Commit: Koichi Sasada CommitDate: 2023-12-20 07:00:41 +0900 use `rb_thread_io_blocking_call()` more use `rb_thread_io_blocking_call()` instead of `rb_thread_io_blocking_region()` more. See https://github.com/ruby/ruby/pull/9178#issuecomment-1858711533 commit ec51a3c8183d555b6ccaa37834fac855ded3af88 Author: Koichi Sasada AuthorDate: 2023-12-20 05:25:38 +0900 Commit: Koichi Sasada CommitDate: 2023-12-20 07:00:41 +0900 declare `rb_thread_io_blocking_call` commit 2fe5fc176b31ce132e05a91b2c96b4a935e46ceb Author: Koichi Sasada AuthorDate: 2023-12-20 06:14:51 +0900 Commit: Koichi Sasada CommitDate: 2023-12-20 07:00:41 +0900 setup `waiting_fd` for `thread_sched_wait_events()` `thread_sched_wait_events()` suspend the thread until the target fd is ready. Howver, other threads can close the target fd and suspended thread should be awake. To support it, setup `waiting_fd` before `thread_sched_wait_events()`. `rb_thread_io_wake_pending_closer()` should be called before `RUBY_VM_CHECK_INTS_BLOCKING()` because it can return this function. This patch introduces additional overhead (setup/cleanup `waiting_fd`) and maybe we can reduce the overhead. commit 28a6e4ea9d9379a654a8f7c4b37fa33aa3ccd0b7 Author: Peter Zhu AuthorDate: 2023-12-20 04:38:57 +0900 Commit: Aaron Patterson CommitDate: 2023-12-20 06:09:36 +0900 Set m_tbl right after allocation We should set the m_tbl right after allocation before anything that can trigger GC to avoid clone_p from becoming old and needing to fire write barriers. Co-authored-by: Aaron Patterson commit 50d39219a9b5f19a536c02ec47b54b79efa015f5 Author: Peter Zhu AuthorDate: 2023-12-20 05:21:28 +0900 Commit: Peter Zhu CommitDate: 2023-12-20 05:21:28 +0900 Use RICLASS_OWNS_M_TBL_P It's more consistent with gc_mark_children. commit bd91c5127ff30f5a21547e73a493c06fbd6da7ae Author: Takashi Kokubun AuthorDate: 2023-12-20 04:47:27 +0900 Commit: GitHub CommitDate: 2023-12-20 04:47:27 +0900 YJIT: Add stats option to RubyVM::YJIT.enable (#9297) commit 084b44e79dd456c9ce09ac06c6faf538160ac6b0 Author: BurdetteLamar AuthorDate: 2023-12-20 00:19:00 +0900 Commit: Peter Zhu CommitDate: 2023-12-20 04:30:33 +0900 RDoc for Complex commit df0bfde2b29b7e8dac333b2a775ab8bff1283a5c Author: Aaron Patterson AuthorDate: 2023-12-19 08:16:31 +0900 Commit: Aaron Patterson CommitDate: 2023-12-20 01:53:52 +0900 We need to load builtins so that they work Before this commit no methods defined in Ruby were being loaded. For example `class` or `tap` methods would not exist. [ruby-core:115793] [Bug #20073] commit 8e6f63df47089361f7988176bb22ed3c96ecf95a Author: Peter Zhu AuthorDate: 2023-12-15 04:15:17 +0900 Commit: Peter Zhu CommitDate: 2023-12-19 23:13:20 +0900 Implement IO::Buffer on VWA commit 1822acdf336d53a2c143b29583c3ca21a9a224f4 Author: Doug Orleans AuthorDate: 2023-12-16 09:37:40 +0900 Commit: Nobuyoshi Nakada CommitDate: 2023-12-19 22:11:11 +0900 [DOC] remove reference to pre-3.0 splat operator behavior commit f9a48548cf3ef54fc0a385ccd78c708737055ecc Author: Koichi Sasada AuthorDate: 2023-12-19 17:32:19 +0900 Commit: Koichi Sasada CommitDate: 2023-12-19 17:59:49 +0900 restore the stack pointer on finalizer When error on finalizer, the exception will be ignored. To restart the code, we need to restore the stack pointer. fix [Bug #20042] commit 96e4f42b3d13f37afce1a8c584a56f6d7e98ec23 Author: Takashi Kokubun AuthorDate: 2023-12-19 17:06:21 +0900 Commit: Takashi Kokubun CommitDate: 2023-12-19 17:06:21 +0900 RJIT: Correct the macro that defines rb_vm_insns_count commit 8d5af353b2ab6c774a473fdb010dcbe3d4e90f0e Author: Takashi Kokubun AuthorDate: 2023-12-19 15:21:31 +0900 Commit: Takashi Kokubun CommitDate: 2023-12-19 17:05:19 +0900 RJIT: Avoid retaining comments unless --rjit-dump-disasm This significantly reduces retained objects on RJIT. commit 8671cd59f78a2bf28d323b6d0c5314e090811a65 Author: Takashi Kokubun AuthorDate: 2023-12-19 17:02:38 +0900 Commit: Takashi Kokubun CommitDate: 2023-12-19 17:02:38 +0900 RJIT: Correct the type of rb_vm_insns_count commit edd6581eec59f0139cfff27bccf9e24c9152a6d3 Author: Takashi Kokubun AuthorDate: 2023-12-19 17:00:18 +0900 Commit: Takashi Kokubun CommitDate: 2023-12-19 17:00:18 +0900 RJIT: Declare rb_vm_insns_count commit eb872d17524f299bdd023f005da38ffcddffa90a Author: Takashi Kokubun AuthorDate: 2023-12-19 16:49:54 +0900 Commit: Takashi Kokubun CommitDate: 2023-12-19 16:55:40 +0900 RJIT: Share rb_vm_insns_count for vm_insns_count commit dee45ac231afd02797640cb335d86550aa620cbe Author: Nobuyoshi Nakada AuthorDate: 2023-12-19 12:59:43 +0900 Commit: Nobuyoshi Nakada CommitDate: 2023-12-19 13:48:51 +0900 [DOC] State MatchData#[] when multiple captures with the same name commit b5f33ba76f9657228746e079eafb8fa952a9ab8b Author: Yuta Saito AuthorDate: 2023-12-19 11:55:24 +0900 Commit: Yuta Saito CommitDate: 2023-12-19 12:40:43 +0900 signal.c: Fix undefined `reset_sigmask` use on Emscripten 3c471149910d79745b50389c436f0ed2973e0d91 added a call to `reset_sigmask` but the guard condition didn't match with the condition used to define `reset_sigmask`. commit f907a7111c5fd26f54c0e020dd64d6325c3fd08b Author: Burdette Lamar AuthorDate: 2023-12-19 11:40:58 +0900 Commit: GitHub CommitDate: 2023-12-19 11:40:58 +0900 [DOC] RDoc for Complex (#9260) commit 36b389c206b0d793da45bc73c8a036e1d5c7a72e Author: Yuta Saito AuthorDate: 2023-12-17 23:21:17 +0900 Commit: Yuta Saito CommitDate: 2023-12-19 11:13:38 +0900 [wasm] dln.c: Guard `dladdr` use in symbol incompatibility check wasi-libc recently added a family of `dl*` functions[^1], but it still doesn't have `dladdr` unlike other platforms. Guard the use of `dladdr` with `HAVE_DLADDR` to avoid build failure with the head version of wasi-libc. The library name is used only for diagnostic purpose if it's not NULL, so it's safe to skip it. [^1]: https://github.com/WebAssembly/wasi-libc/commit/b85d65528d6e17ae1874c6cc6a6a3ac02e83021a commit 5ea862f26e86be6fabcc938e22bc2d5c2bbc8341 Author: Hiroshi SHIBATA AuthorDate: 2023-12-19 10:56:54 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-19 11:07:47 +0900 [ruby/psych] Bump up 5.1.2 https://github.com/ruby/psych/commit/a9ab74d132 commit b3598f95fa997e667bb9e8003b0284ab2a4db081 Author: Alexander Momchilov AuthorDate: 2023-12-18 18:01:01 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-19 11:07:46 +0900 [ruby/psych] Use `assert_same` in tests where applicable https://github.com/ruby/psych/commit/0dc25a9d6a commit e6fa1d62faf6ba4b0f3277e2e92e6e60d4330cc8 Author: Alexander Momchilov AuthorDate: 2023-12-18 18:00:48 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-19 11:07:45 +0900 [ruby/psych] Use `compare_by_identity` instead of `object_id` Object IDs became more expensive in Ruby 2.7. Using `Hash#compare_by_identity` let's us get the same effect, without needing to force all these objects to have object_ids assigned to them. https://github.com/ruby/psych/commit/df69e4a12e commit 46085ef970ab50b5e1c7878345a39528823461ac Author: Nobuyoshi Nakada AuthorDate: 2023-12-18 20:22:22 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-19 10:20:40 +0900 [DOC] No ducuments for internal library commit ce436ff3e3cbd6810d7cf83fedbd2b55995ca0b1 Author: Peter Zhu AuthorDate: 2023-12-19 03:30:24 +0900 Commit: Peter Zhu CommitDate: 2023-12-19 09:25:37 +0900 Fix flaky test test_stat_heap The test sometimes fails with: 1) Failure: TestGc#test_stat_heap [/tmp/ruby/src/trunk-repeat50/test/ruby/test_gc.rb:169]: Expected 33434403 to be <= 33434354. commit 3c471149910d79745b50389c436f0ed2973e0d91 Author: Alan Wu AuthorDate: 2023-12-19 06:37:52 +0900 Commit: Alan Wu CommitDate: 2023-12-19 08:19:53 +0900 Unmask signal before re-raising fatal signal On Linux, while the signal handler runs, that signal is masked, so in the rb_bug_for_fatal_signal() code path we didn't get the default signal action as intended. See signal(7). It worked fine on macOS, though. Before: $ ./miniruby -e 'Process.kill :SIGSEGV, Process.pid' Aborted (core dumped) After: $ ./miniruby -e 'Process.kill :SIGSEGV, Process.pid' Segmentation fault (core dumped) Follow-up for 1ac0afab4da "rb_bug_for_fatal_signal: exit with the right signal". commit 11fa76b1b521072c200c78ea023960221ff426d6 Author: Alexander Momchilov AuthorDate: 2023-12-18 17:19:02 +0900 Commit: Peter Zhu CommitDate: 2023-12-19 04:51:16 +0900 compare_by_identity: remove alloc for non-empty Hash If a Hash is non-empty, there's no point calling `ar_force_convert_table`. We'll be immediately discarding that new st table, and replacing it with the new `identtable` st table that we're stealing out of `tmp`. commit b5c6c0122f5b010cb5f43e7a236c4ba2b1d56a2a Author: Alexander Momchilov AuthorDate: 2023-12-18 17:17:44 +0900 Commit: Peter Zhu CommitDate: 2023-12-19 04:51:16 +0900 compare_by_identity: remove alloc for empty Hash For non-empty Hashes, this function needs to rehash all the stored values (using the new `compare` and `hash` functions from `identhash`). It does so by writing into a newly allocated `tmp` Hash, and then transferring ownership of its st table into `self`. For empty Hashes, we can skip allocating this `tmp`, because there's nothing to re-hash. We can just modify our new st table's `type` in-place. commit 893fe30ef2b30525d932d6b1256f717cc60b3311 Author: Matt Valentine-House AuthorDate: 2023-12-19 01:56:01 +0900 Commit: Matt Valentine-House CommitDate: 2023-12-19 04:44:44 +0900 [PRISM] Fix crash when --parser=prism called with stdin [Bug #20071] Currently Ruby crashes when the --parser=prism flag is used either with no input, or with input that is being redirected from stdin. So all of the following will crash ruby --parser=prism ruby --parser=prism < test_code.rb cat test_code.rb | ruby --parser=prism This commit checks whether the input is assumed to be from stdin, and then processes that as a file. This will fix the second and third case above, but will cause a slight behavioural changes for the first case - Ruby will treat stdin as an empty file in this case and exit, rather than waiting for data to be piped into stdin. commit 4b125b70d8584c6ebf2971d588c5c8a106fffc05 Author: Takashi Kokubun AuthorDate: 2023-12-19 04:36:54 +0900 Commit: Takashi Kokubun CommitDate: 2023-12-19 04:36:55 +0900 [DOC] Copy Prism release notes to NEWS commit 71b7a24c244960a581ee881d48ed38f4188364be Author: Takashi Kokubun AuthorDate: 2023-12-19 04:11:50 +0900 Commit: Takashi Kokubun CommitDate: 2023-12-19 04:11:50 +0900 [DOC] Clarify what is 3.2 commit 495a237ef35443361144ebc1bd81439c770e90e9 Author: Takashi Kokubun AuthorDate: 2023-12-19 03:50:06 +0900 Commit: Takashi Kokubun CommitDate: 2023-12-19 03:50:14 +0900 [DOC] Note about yjit_alloc_size in NEWS It's a pretty useful feature in 3.3. commit 6c4b04de5cba36077f86b08d54c4c316f3df1d87 Author: Koichi Sasada AuthorDate: 2023-12-18 21:40:43 +0900 Commit: Koichi Sasada CommitDate: 2023-12-19 02:26:37 +0900 clear `sched->lock_onwer` at fork `sched->lock_owner` can be non-NULL at fork because the timer thread can acquire the lock while forking. `lock_owner` information is for debugging, so we only need to clear it at fork. I hope this patch fixes the following assertion failure: ``` thread_pthread.c:354:thread_sched_lock_:sched->lock_owner == NULL ``` commit f35fec771047de15127c0e00d22b9eccd5487f51 Author: Peter Zhu AuthorDate: 2023-12-13 00:19:56 +0900 Commit: Peter Zhu CommitDate: 2023-12-19 00:37:21 +0900 Reset pinned_slots at the beginning of GC pinned_slots is not being reset every GC, which causes this assertion to fail: ``` Assertion Failed: gc.c:7076:gc_pin:GET_HEAP_PAGE(obj)->pinned_slots <= GET_HEAP_PAGE(obj)->total_slots ``` This commit changes it to reset it at the beginning of every compaction GC cycle. commit f6ad49b87c110b618632a4a258896e3f5673000b Author: Jean Boussier AuthorDate: 2023-12-18 21:16:20 +0900 Commit: Benoit Daloze CommitDate: 2023-12-18 21:42:02 +0900 Use #initialize instead of `initialize` in shape perf warning This is more consistent with other messages. commit b2fc1b054e9c1a04c20c696f6889b6143e9b8592 Author: Jean Boussier AuthorDate: 2023-12-18 18:17:15 +0900 Commit: Jean Boussier CommitDate: 2023-12-18 20:58:08 +0900 Update `BasicSocket#recv` documentation on return value Ref: https://github.com/ruby/ruby/pull/6407 [Bug #19012] `0` is now interpreted as closed connection an not an empty packet, as these are very rare and pretty much useless. commit 40fc9b070ca68e0bd1d57e4dd712172e2faeaa2b Author: Nobuyoshi Nakada AuthorDate: 2023-12-18 19:57:45 +0900 Commit: Nobuyoshi Nakada CommitDate: 2023-12-18 20:17:45 +0900 [DOC] No document for internal or debug methods commit baf1403fba01c36b44dbd7bc658fed748ee7bc1e Author: Nobuyoshi Nakada AuthorDate: 2023-12-18 19:52:06 +0900 Commit: Nobuyoshi Nakada CommitDate: 2023-12-18 20:17:45 +0900 [DOC] Show `PTY.getpty` as an alias of `PTY.spawn` `:nodoc:` directive does not work at method definition in C, and must be at the implementation function. That is, there is no way to make one method visible and another method sharing the implementation invisible at the same time. commit 835f1461f7d34941c8163650eb94965533eba029 Author: Nobuyoshi Nakada AuthorDate: 2023-12-18 19:51:16 +0900 Commit: Nobuyoshi Nakada CommitDate: 2023-12-18 20:17:44 +0900 [DOC] Add document of IO::Buffer#hexdump commit e9b0b6015ea393af9771ca23f7493c388ef17858 Author: Nobuyoshi Nakada AuthorDate: 2023-12-18 19:46:24 +0900 Commit: Nobuyoshi Nakada CommitDate: 2023-12-18 20:17:44 +0900 [DOC] Add documents of constants for IO#wait event mask commit 494e6b54ab37355740f88500b75cb701339b7fd9 Author: Nobuyoshi Nakada AuthorDate: 2023-12-18 19:43:52 +0900 Commit: Nobuyoshi Nakada CommitDate: 2023-12-18 20:17:44 +0900 [DOC] Add links from `File::Constants` in dir.c to `File` constants Due to the bug ruby/rdoc#1067, `rb_file_const` needs `Document-const` directives. commit 9b00b2bfb290f90c572bd3d969dd1f3758ed6eea Author: Nobuyoshi Nakada AuthorDate: 2023-12-18 19:42:57 +0900 Commit: Nobuyoshi Nakada CommitDate: 2023-12-18 20:17:44 +0900 [DOC] Add links from `File::Constants` to `File` constants commit a94f3f206e186b42f49475f003992f909ec1a314 Author: Nobuyoshi Nakada AuthorDate: 2023-12-18 14:43:42 +0900 Commit: Nobuyoshi Nakada CommitDate: 2023-12-18 20:17:44 +0900 [DOC] Added notes regarding `:nodoc:` in C code commit 9abaf00c070d00d880e05182bc1f0fba3eba8231 Author: Nobuyoshi Nakada AuthorDate: 2023-12-18 12:44:28 +0900 Commit: Nobuyoshi Nakada CommitDate: 2023-12-18 20:17:43 +0900 [DOC] documents of aliased methods commit ba1d1522d35a7dd2595603ead57cd0fa8b21ba8b Author: Jean Boussier AuthorDate: 2023-12-18 17:59:06 +0900 Commit: Jean Boussier CommitDate: 2023-12-18 18:33:18 +0900 Make the SHAPE_TOO_COMPLEX performance warning more actionable As suggested by Mame, we should try to help users fix the issues without having to lookup the meaning of the warning. commit e8064c6c2c317be78953b4d19226368580af0dca Author: Takashi Kokubun AuthorDate: 2023-12-18 14:16:09 +0900 Commit: Takashi Kokubun CommitDate: 2023-12-18 14:17:19 +0900 Shorten the workflow name Looking at the name in the list, "Miscellaneous / Miscellaneous checks" seems too verbose/repetitive. Let's make it "Misc / Miscellaneous checks". commit 83194aa27dcadb87a5669c05c8dc96149e8c11e2 Author: Takashi Kokubun AuthorDate: 2023-12-18 14:14:23 +0900 Commit: Takashi Kokubun CommitDate: 2023-12-18 14:15:11 +0900 Make the check_misc job name more descriptive We're going to add check_misc as a required status check, and "checks" was a bit too vague for matching the job name. commit d8978445ae6b9bc0827c55a3721de329ba441b78 Author: Takashi Kokubun AuthorDate: 2023-12-18 13:45:09 +0900 Commit: GitHub CommitDate: 2023-12-18 13:45:09 +0900 Improve YJIT documentation for Ruby 3.3 (#9263) commit e14dddcaca6eb0a6e55c128ffdceb18681009c49 Author: Yusuke Endoh AuthorDate: 2023-12-16 00:25:00 +0900 Commit: Yusuke Endoh CommitDate: 2023-12-16 00:25:00 +0900 Tweak NEWS.md * Move `defined?(@var)` optimization into GC section * Remove a trailing space. commit 0601bce6fc57cef5ae22a944b15b8e9fca1ef6ef Author: Nobuyoshi Nakada AuthorDate: 2023-12-18 08:49:06 +0900 Commit: Nobuyoshi Nakada CommitDate: 2023-12-18 08:49:06 +0900 [DOC] Add Socket::ResolutionError documentation commit 71c4a9c38f67dd393d64b4f68110b742a59cf082 Author: Nobuyoshi Nakada AuthorDate: 2023-12-18 08:47:59 +0900 Commit: Nobuyoshi Nakada CommitDate: 2023-12-18 08:47:59 +0900 [DOC] Correct the location of Addrinfo document The document must be placed immediately before the class definition. No other statements can be placed in between. commit e316128e3d3bdd245eb74344df5fa5c2a43eaaf7 Author: Nobuyoshi Nakada AuthorDate: 2023-12-18 08:38:59 +0900 Commit: Nobuyoshi Nakada CommitDate: 2023-12-18 08:38:59 +0900 [DOC] Stop unintentional references to builtin or standard names commit 7bfa1c3dc911f5c36ac64d6b4f410e4f12a7d4ca Author: Nobuyoshi Nakada AuthorDate: 2023-12-17 22:37:15 +0900 Commit: Nobuyoshi Nakada CommitDate: 2023-12-17 22:37:15 +0900 Revert "[DOC] Make undocumented socket constans nodoc" This reverts commit cbda94edd80b0f664eda927f9ce9405b2074633a, because `:nodoc:` does not work for constants. In the case of `rb_define_const`, RDoc parses the preceeding comment as in `"/* definition: comment */"` form. commit aab74eafdeca6173d82eccc97de628538ff0c6fd Author: Nobuyoshi Nakada AuthorDate: 2023-12-17 21:17:48 +0900 Commit: Nobuyoshi Nakada CommitDate: 2023-12-17 21:17:48 +0900 [DOC] Fix Travis-CI condition "Not document only" should be honored always. Also simplified repo and branch conditions commit cbda94edd80b0f664eda927f9ce9405b2074633a Author: Nobuyoshi Nakada AuthorDate: 2023-12-17 20:17:45 +0900 Commit: Nobuyoshi Nakada CommitDate: 2023-12-17 20:17:45 +0900 [DOC] Make undocumented socket constans nodoc commit 557d929ba699f3f30fd17290d42f331f5551a794 Author: Nobuyoshi Nakada AuthorDate: 2023-12-17 20:17:05 +0900 Commit: Nobuyoshi Nakada CommitDate: 2023-12-17 20:17:05 +0900 [DOC] Utilize COMMENTS.default_proc to add fallback documents commit d7d10f3ee85ecd1a1d59a60b8c35d85602250d87 Author: Hiroshi SHIBATA AuthorDate: 2023-12-17 06:45:33 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-17 06:45:33 +0900 Adjust rubygems style commit 8db0de92a8454b449efb243f380f5d2b68c38d7c Author: Hiroshi SHIBATA AuthorDate: 2023-12-17 06:39:16 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-17 06:39:16 +0900 Restore tracked_files for ruby core repo commit ab7f54688b495b3218843e58992b713c3b28011f Author: Nobuyoshi Nakada AuthorDate: 2023-12-17 00:30:00 +0900 Commit: Nobuyoshi Nakada CommitDate: 2023-12-17 00:30:00 +0900 Stir the hash value more with encoding index commit 40113454b1362554dee83454df76e5892999247f Author: Hiroshi SHIBATA AuthorDate: 2023-12-16 20:40:19 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-16 21:02:45 +0900 Use regex instead of hard coded paths commit ab87cd0baa884797b608013de24ab645cd38999f Author: Hiroshi SHIBATA AuthorDate: 2023-12-16 19:00:42 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-16 21:02:45 +0900 We don't use tracked_files in before(:suite). It breaks with release package. commit ad2a38dce4ac2e28c825080f4724d0ffed805e16 Author: Hiroshi SHIBATA AuthorDate: 2023-12-16 16:55:45 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-16 17:36:47 +0900 Added simple test script commit 83bdf127b8ddbb64c941bb9c467c686140b1696b Author: Samuel Giddins AuthorDate: 2023-12-16 15:52:20 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-16 17:34:45 +0900 Avoid warning when requiring bigdecimal/util when bigdecimal is in gemfile commit 6f6b36b7e47d29ff8bc33918265a8bb4148109e8 Author: Hiroshi SHIBATA AuthorDate: 2023-12-16 16:39:31 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-16 16:44:34 +0900 Added test for sub-feature like bigdecimal/util commit b710f96b5aaeb6c153e4b1a7e1b46c4521214126 Author: Nobuyoshi Nakada AuthorDate: 2023-12-16 13:48:49 +0900 Commit: Nobuyoshi Nakada CommitDate: 2023-12-16 16:00:12 +0900 [Bug #20068] Encoding does not matter to empty strings commit dd49ee152ba4153f5c4cf44896975cf1e0ee739e Author: Hiroshi SHIBATA AuthorDate: 2023-12-16 15:41:43 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-16 15:41:43 +0900 Use minimum arguments for Bootsnap commit 582862754fbbcc521e3d660eba6bfb566abf1bc2 Author: Hiroshi SHIBATA AuthorDate: 2023-12-16 14:50:20 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-16 14:51:34 +0900 [ruby/io-console] Bump up v0.7.1 https://github.com/ruby/io-console/commit/8ac766d870 commit 80d63fbea57ca5369901ee51fda1577a9ec605e0 Author: Hiroshi SHIBATA AuthorDate: 2023-12-16 14:48:30 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-16 14:49:13 +0900 [ruby/readline] Bump up v0.0.4 https://github.com/ruby/readline/commit/7dbc5bd8d9 commit cb636fe7075a260e4d47327764924a3ad10b502a Author: hogelog AuthorDate: 2023-12-07 01:05:53 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-16 14:49:12 +0900 [ruby/readline] Fix readline-ext gem loading in non Unix-like environments https://github.com/ruby/readline/commit/6e1e5d0eb8 commit 20fbdae5fe3d3fa98d4f2fb8c5c8895a238576e5 Author: ima1zumi <52617472+ima1zumi@users.noreply.github.com> AuthorDate: 2023-11-29 02:00:12 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-16 14:47:04 +0900 [ruby/reline] Bump version to 0.4.1 (https://github.com/ruby/reline/pull/612) https://github.com/ruby/reline/commit/8937279e0f commit 4fd3c85acdfa942d88d8e9e2ccd17b8030c2c3b2 Author: Hiroshi SHIBATA AuthorDate: 2023-12-16 14:20:16 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-16 14:20:55 +0900 [ruby/ipaddr] Bump up v1.2.6 https://github.com/ruby/ipaddr/commit/247459faa5 commit 8936bb74c66e68f44d2a18564ea0b0d5e290cc6e Author: Hiroshi SHIBATA AuthorDate: 2023-12-16 14:02:44 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-16 14:06:47 +0900 [ruby/abbrev] Bump up v0.1.2 https://github.com/ruby/abbrev/commit/b362e8e3b9 commit 3b6828f9679ac2a8cd26d9e68fa042b9c4452d0a Author: Hiroshi SHIBATA AuthorDate: 2023-12-16 14:05:40 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-16 14:06:37 +0900 [ruby/syslog] Bump up v0.1.2 https://github.com/ruby/syslog/commit/f7b29e2199 commit 2b3fc0407a9b9527ae5bf8069943661a061ec0ba Author: Hiroshi SHIBATA AuthorDate: 2023-12-16 13:09:34 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-16 13:10:38 +0900 [ruby/securerandom] Bump up v0.3.1 https://github.com/ruby/securerandom/commit/890d659970 commit 6a79e53823e328281b9e9eee53cd141af28f8548 Author: Hiroshi SHIBATA AuthorDate: 2023-12-16 13:00:36 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-16 13:00:59 +0900 Rollback to released version numbers of stringio and strscan commit 1a244730a9fada79fbfc1b2f478c2fd8fc108e4a Author: Hiroshi SHIBATA AuthorDate: 2023-12-16 12:46:34 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-16 12:48:49 +0900 [ruby/open3] Bump up v0.2.1 https://github.com/ruby/open3/commit/b890922205 commit 6c7c4ac407c4eb2f70cd599c78808c5cd10b9c13 Author: Hiroshi SHIBATA AuthorDate: 2023-12-16 12:39:42 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-16 12:42:30 +0900 [ruby/rdoc] Bump up v6.6.2 https://github.com/ruby/rdoc/commit/895f1affc0 commit d242e8416e99eaee4465e2681210ae8b7ecd6d34 Author: Hiroshi SHIBATA AuthorDate: 2023-12-16 12:05:46 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-16 12:08:51 +0900 Revert all of commits after Prism 0.19.0 release We should bundle released version of Prism for Ruby 3.3.0 commit 711e85674e7c98909f5a43b7852ddc763beaa744 Author: Hiroshi SHIBATA AuthorDate: 2023-12-16 11:13:35 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-16 11:13:35 +0900 Pin versions that are RubyGems 2.5.1 and Bundler 2.5.1 commit f4e9336d4347e1086eb00494f90650cf6fde3be0 Author: Samuel Giddins AuthorDate: 2023-12-15 18:40:34 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-16 11:13:20 +0900 Partly pick commit from https://github.com/rubygems/rubygems/pull/7285 Refactor vendoring to allow validating vendoring is reproducible Helps ensure that unsuspecting diffs to the vendored code arent accidentally introduced commit d5af5a48a59dffdd0b156d58167e31109d19c491 Author: David Rodríguez AuthorDate: 2023-12-16 01:59:29 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-16 11:09:50 +0900 Fix Sinatra warning during specs Some specs now print the following warning: ``` /path/to/bundler/tmp/1/gems/base/ruby/3.2.0/gems/sinatra-2.0.8.1/lib/sinatra/base.rb:902: warning: constant Tilt::Cache is deprecated ``` Updating sinatra to latest & greatest fixes it. Update other deps too since at it. commit 7cd4282cc8b4e8b242f082d806549d87964c4f8c Author: David Rodríguez AuthorDate: 2023-12-14 21:32:36 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-16 11:07:52 +0900 [rubygems/rubygems] Fix Bundler daily CI A default Bundler copy with vendored net-http is causing a Bundler spec to end up loading that copy instead of the copy of Bundler under test. This is because of vcr, but we don't really need vcr in the command that's failing, so I avoided loading it. https://github.com/rubygems/rubygems/commit/304ab6e1b9 commit 0ff34aa13e9340871d5aeb339b5d86c52c7c2ca6 Author: David Rodríguez AuthorDate: 2023-12-15 00:50:50 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-16 11:07:05 +0900 [rubygems/rubygems] More improves to default gem home selection for installation https://github.com/rubygems/rubygems/commit/966daf7d42 commit 299eb8d1179ed7bea49c50b0fa003bf0724f6fb4 Author: David Rodríguez AuthorDate: 2023-12-15 02:43:35 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-16 11:06:07 +0900 [rubygems/rubygems] Improve command suggestion when gems are missing Previous attempt to use a full path when the running version is different than the one that would be activated by default are different was not correct. This is because if this error happens in a `bundle exec` context, the `Gem.loaded_specs` is cleared because we're in an exec'd process, so will be always using a full path in these cases. This alternative approach should do what I was expecting. https://github.com/rubygems/rubygems/commit/e0bb8bf51b commit c8e9cd2b8b65e58e48d4ca14203c5a5d08a2d728 Author: David Rodríguez AuthorDate: 2023-12-16 01:02:15 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-16 11:04:38 +0900 [rubygems/rubygems] Fix Ruby DSL no longer working as expected https://github.com/rubygems/rubygems/commit/f6258e5679 Co-authored-by: AndrewSwerlick commit b8074c2f043d99f6f30ab75ad21cc2c998f49dcf Author: eileencodes AuthorDate: 2023-12-16 01:32:10 +0900 Commit: Kevin Newton CommitDate: 2023-12-16 06:23:06 +0900 [PRISM] Fix incorrect instructions for `default_proc=` This is kind of specific and was found via debugging ruby/prism#2061 but does not actually fix that issue. The change here checks for `!popped` for the additional instructions that are normally added for nodes with the `attribute_write` flag. I also removed the extra catch table by deleting the `ISEQ_COMPILE_DATA(iseq)->catch_except_p = true;` line. I'm...not entirely sure why it was added but it doesn't match the upstream compiler [code](https://github.com/ruby/ruby/blob/92b10f5be7453aceb5863e46ac775a4ddbf83b97/compile.c#L887-L892). The changes here unfortunately don't improve the test failures mentioned in the linked issue so we still have other issues with instructions for hashes. Instructions before: ``` "********* Ruby *************" == disasm: #@:1 (1,0)-(34,8)> local table (size: 1, argc: 0 [opts: 0, rest: -1, post: 0, block: -1, kw: -1@-1, kwrest: -1]) [ 1] h@0 0000 putnil ( 32)[Li] 0001 putobject true 0003 getconstant :Hash 0005 send , nil 0008 setlocal h@0, 0 0011 getlocal h@0, 0 ( 33)[Li] 0014 putspecialobject 1 0016 send , block in 0019 send , nil 0022 pop 0023 getlocal h@0, 0 ( 34)[Li] 0026 putobject :nope 0028 send , nil 0031 leave == disasm: #@:33 (33,19)-(33,32)> local table (size: 2, argc: 2 [opts: 0, rest: -1, post: 0, block: -1, kw: -1@-1, kwrest: -1]) [ 2] _@0 [ 1] _@1 0000 putobject true ( 33)[LiBc] 0002 leave [Br] true "********* PRISM *************" == disasm: #@:31 (31,0)-(33,8)> local table (size: 1, argc: 0 [opts: 0, rest: -1, post: 0, block: -1, kw: -1@-1, kwrest: -1]) [ 1] h@0 0000 putnil ( 31)[Li] 0001 putobject true 0003 getconstant :Hash 0005 send , nil 0008 setlocal h@0, 0 0011 putnil ( 32)[Li] 0012 getlocal h@0, 0 0015 putspecialobject 1 0017 send , block in 0020 setn 2 0022 send , nil 0025 pop 0026 pop 0027 getlocal h@0, 0 ( 33)[Li] 0030 putobject :nope 0032 send , nil 0035 leave ( 31) == disasm: #@:32 (32,17)-(32,32)> == catch table | catch type: redo st: 0000 ed: 0002 sp: 0000 cont: 0000 | catch type: next st: 0000 ed: 0002 sp: 0000 cont: 0002 |------------------------------------------------------------------------ local table (size: 2, argc: 2 [opts: 0, rest: -1, post: 0, block: -1, kw: -1@-1, kwrest: -1]) [ 2] _@0 [ 1] _@1 0000 putobject true ( 32)[LiBc] 0002 leave [Br] ``` Instructions after: ``` "********* Ruby *************" == disasm: #@:1 (1,0)-(34,8)> local table (size: 1, argc: 0 [opts: 0, rest: -1, post: 0, block: -1, kw: -1@-1, kwrest: -1]) [ 1] h@0 0000 putnil ( 32)[Li] 0001 putobject true 0003 getconstant :Hash 0005 send , nil 0008 setlocal h@0, 0 0011 getlocal h@0, 0 ( 33)[Li] 0014 putspecialobject 1 0016 send , block in 0019 send , nil 0022 pop 0023 getlocal h@0, 0 ( 34)[Li] 0026 putobject :nope 0028 send , nil 0031 leave == disasm: #@:33 (33,19)-(33,32)> local table (size: 2, argc: 2 [opts: 0, rest: -1, post: 0, block: -1, kw: -1@-1, kwrest: -1]) [ 2] _@0 [ 1] _@1 0000 putobject true ( 33)[LiBc] 0002 leave [Br] "********* PRISM *************" == disasm: #@:31 (31,0)-(33,8)> local table (size: 1, argc: 0 [opts: 0, rest: -1, post: 0, block: -1, kw: -1@-1, kwrest: -1]) [ 1] h@0 0000 putnil ( 31)[Li] 0001 putobject true 0003 getconstant :Hash 0005 send , nil 0008 setlocal h@0, 0 0011 getlocal h@0, 0 ( 32)[Li] 0014 putspecialobject 1 0016 send , block in 0019 send , nil 0022 pop 0023 getlocal h@0, 0 ( 33)[Li] 0026 putobject :nope 0028 send , nil 0031 leave ( 31) == disasm: #@:32 (32,17)-(32,32)> local table (size: 2, argc: 2 [opts: 0, rest: -1, post: 0, block: -1, kw: -1@-1, kwrest: -1]) [ 2] _@0 [ 1] _@1 0000 putobject true ( 32)[LiBc] 0002 leave [Br] ``` commit 161787f9beef96c9fa1057b6378fe7e048ac2ecd Author: Matt Valentine-House AuthorDate: 2023-12-16 05:07:49 +0900 Commit: Kevin Newton CommitDate: 2023-12-16 06:15:10 +0900 [PRISM] Compile CallTargetNode commit 5b6a4d8c1253fd1ab77c0539d33276fe1856cf24 Author: Matt Valentine-House AuthorDate: 2023-12-14 06:09:39 +0900 Commit: Kevin Newton CommitDate: 2023-12-16 06:15:10 +0900 [PRISM] Compile IndexTargetNode commit b9542246c92109b9639ee9976ac16f54a8759cfc Author: Gopal Patel AuthorDate: 2023-12-16 04:32:12 +0900 Commit: git[bot] CommitDate: 2023-12-16 06:14:58 +0900 [ruby/prism] Fix majority of RBS type mismatches https://github.com/ruby/prism/commit/62cc50e41b commit 2e8cfcac9129ed8680c4b916bc5b4c535ae6e8c8 Author: eileencodes AuthorDate: 2023-12-16 03:44:31 +0900 Commit: git[bot] CommitDate: 2023-12-16 05:55:13 +0900 [ruby/prism] String literal hash keys should be frozen String literal hash keys can't be mutated by the user so we should mark them as frozen. We were seeing instructions for hashes with string literal keys using two `putstring` instructions when it should be a `putobject` and `putstring`. Code example: ```ruby { "a" => "b" } ``` Instructions before: ``` "********* Ruby *************" == disasm: #@:1 (1,0)-(2,14)> 0000 putobject "a" ( 2)[Li] 0002 putstring "b" 0004 newhash 2 0006 leave "********* PRISM *************" == disasm: #@:1 (1,0)-(1,14)> 0000 putstring "a" ( 1)[Li] 0002 putstring "b" 0004 newhash 2 0006 leave ``` Instructions after: ``` "********* Ruby *************" == disasm: #@:1 (1,0)-(2,14)> 0000 putobject "a" ( 2)[Li] 0002 putstring "b" 0004 newhash 2 0006 leave "********* PRISM *************" == disasm: #@:1 (1,0)-(1,14)> 0000 putobject "a" ( 1)[Li] 0002 putstring "b" 0004 newhash 2 0006 leave ``` https://github.com/ruby/prism/commit/b14ae55385 commit 9c9e6d5b91f23c15357d88036382d68ae3c77d97 Author: Koichi Sasada AuthorDate: 2023-12-16 04:39:31 +0900 Commit: Koichi Sasada CommitDate: 2023-12-16 04:45:25 +0900 [DOC] NEWS entries for C APIs commit f933cde9390563160d8a12c901e7a408f523c457 Author: Martin Emde AuthorDate: 2023-12-16 03:30:14 +0900 Commit: git[bot] CommitDate: 2023-12-16 04:36:24 +0900 [rubygems/rubygems] Let the guards have some space to breathe https://github.com/rubygems/rubygems/commit/73f1609715 commit d9b39093e2bac70f121e38f4354a6a58c1b245a3 Author: Martin Emde AuthorDate: 2023-12-15 05:42:15 +0900 Commit: git[bot] CommitDate: 2023-12-16 04:36:24 +0900 [rubygems/rubygems] Use a mutex around Checksum::Store @store access Not wrapping to_lock since access to it is single threaded and read-only at the time of writing the lockfile. https://github.com/rubygems/rubygems/commit/3b53aa1b12 commit 1cfe874ef83cdb7776ecf892c470af634532501c Author: Martin Emde AuthorDate: 2023-12-15 05:41:08 +0900 Commit: git[bot] CommitDate: 2023-12-16 04:36:24 +0900 [rubygems/rubygems] Remove test-only & unused methods from Checksum::Store https://github.com/rubygems/rubygems/commit/79636dec12 commit 0a31cb1a37f184daa7c2839abd6a827793fdd2f3 Author: Ufuk Kayserilioglu AuthorDate: 2023-12-16 03:03:44 +0900 Commit: git[bot] CommitDate: 2023-12-16 03:45:36 +0900 [ruby/prism] Finish keyword hash node flag refactor by renaming flag https://github.com/ruby/prism/commit/7f812389f8 commit b418e5a5800513da7204c0ba7b3a95a2d9ee9a7e Author: Kevin Newton AuthorDate: 2023-12-16 03:18:40 +0900 Commit: Kevin Newton CommitDate: 2023-12-16 03:42:19 +0900 Update error message in test_rubyoptions commit a604fe42620735f7bd1145e01bdca5398231ffb0 Author: Adam Hess AuthorDate: 2023-12-15 07:40:37 +0900 Commit: Kevin Newton CommitDate: 2023-12-16 03:42:19 +0900 update message to clarify compiler, not parser Co-authored-by: Ufuk Kayserilioglu commit 55326a915f25608be1d40ab32baa9fc57762615d Author: HParker AuthorDate: 2023-12-08 08:47:36 +0900 Commit: Kevin Newton CommitDate: 2023-12-16 03:42:19 +0900 Introduce --parser runtime flag Introduce runtime flag for specifying the parser, ``` ruby --parser=prism ``` also update the description: ``` $ ruby --parser=prism --version ruby 3.3.0dev (2023-12-08T04:47:14Z add-parser-runtime.. 0616384c9f) +PRISM [x86_64-darwin23] ``` [Bug #20044] commit 655c02790ee5aca122d3593fadab5b41a42a1899 Author: Burdette Lamar AuthorDate: 2023-12-16 03:32:32 +0900 Commit: GitHub CommitDate: 2023-12-16 03:32:32 +0900 [DOC] RDoc for Complex (#9254) commit 92b10f5be7453aceb5863e46ac775a4ddbf83b97 Author: Nobuyoshi Nakada AuthorDate: 2023-12-16 01:07:06 +0900 Commit: Nobuyoshi Nakada CommitDate: 2023-12-16 02:11:51 +0900 [Bug #20062] Fixed numbered parameter syntax error At the method definition, the local scope that saves the context of the numbered parameters needs to be pushed before saving. commit 1ac0afab4da1986d6eefd421ca3877afd47d2a77 Author: Jean Boussier AuthorDate: 2023-12-16 01:08:34 +0900 Commit: Jean Boussier CommitDate: 2023-12-16 01:48:43 +0900 rb_bug_for_fatal_signal: exit with the right signal `die()` calls `abort()` which always exit as it `SIGABRT` was received. This isn't very friendly with systems that automatically collect crashes as the `%s` parameter will be changed. commit c9a9b8036c71974ab938a8bb3d6f095d4a318a8e Author: Koichi Sasada AuthorDate: 2023-12-15 18:25:12 +0900 Commit: Koichi Sasada CommitDate: 2023-12-16 01:00:01 +0900 remove `Ractor::Selector` from Ruby level `Ractor::Selector` is not approved by Matz so remove it from Ruby-level. The implementation is used by `Ractor.select` so most of implementation was remaind and calling `rb_init_ractor_selector()`, `Ractor::Selector` will be defined. I will provide `ractor-selector` gem to try it. commit 9b4cb69a88163340cac7c0a350eaf18832edb28f Author: Koichi Sasada AuthorDate: 2023-12-15 18:59:54 +0900 Commit: Koichi Sasada CommitDate: 2023-12-16 01:00:01 +0900 support `skip` in bootstraptest commit 5a66ea23d2c244bac5d87a08939419cd300cf4cc Author: Samuel Giddins AuthorDate: 2023-12-14 11:10:49 +0900 Commit: git[bot] CommitDate: 2023-12-16 00:32:56 +0900 [rubygems/rubygems] Use mkdir_p helper in bundler.rb Small refactor, no functional change https://github.com/rubygems/rubygems/commit/5edb7a1026 commit 474b4c42f4d1c36d94548548e03f6649f2119f67 Author: HParker AuthorDate: 2023-12-15 05:03:00 +0900 Commit: Peter Zhu CommitDate: 2023-12-16 00:31:15 +0900 free ractors with ractor_free Previously with RUBY_FREE_ON_EXIT, ractors where being xfree-ed which is incorrect since they are not xmalloced. Instead we can free ractors with ractor free during shutdown. This change only effects main ractor freeing when RUBY_FREE_ON_EXIT is set. Co-authored-by: John Hawthorn commit 049a9bd62f0907caa8d2eca6337cd2542a5c7726 Author: eileencodes AuthorDate: 2023-12-14 02:49:37 +0900 Commit: Kevin Newton CommitDate: 2023-12-16 00:27:44 +0900 [PRISM] Fix `compile_prism` when src is a file `compile_prism` can take a source and file (and other arguments) or a file as the source. `compile` checks if the source is a file and if it is converts it. `compile_prism` is now doing the same thing. On the Ruby side `compile` handles a file [here](https://github.com/ruby/ruby/blob/master/iseq.c#L1159-L1162). Before: ``` "********* Ruby *************" == disasm: #@:1 (1,0)-(26,21)> local table (size: 1, argc: 0 [opts: 0, rest: -1, post: 0, block: -1, kw: -1@-1, kwrest: -1]) [ 1] name@0 0000 putstring "Prism" ( 25)[Li] 0002 setlocal name@0, 0 0005 putself ( 26)[Li] 0006 putobject "hello, " 0008 getlocal name@0, 0 0011 dup 0012 objtostring 0014 anytostring 0015 concatstrings 2 0017 send , nil 0020 leave hello, Prism "********* PRISM *************" ./test.rb:13:in `compile_prism': wrong argument type File (expected String) (TypeError) from ./test.rb:13:in `
' make: *** [run] Error 1 ``` After: ``` "********* Ruby *************" == disasm: #@:1 (1,0)-(26,21)> local table (size: 1, argc: 0 [opts: 0, rest: -1, post: 0, block: -1, kw: -1@-1, kwrest: -1]) [ 1] name@0 0000 putstring "Prism" ( 25)[Li] 0002 setlocal name@0, 0 0005 putself ( 26)[Li] 0006 putobject "hello, " 0008 getlocal name@0, 0 0011 dup 0012 objtostring 0014 anytostring 0015 concatstrings 2 0017 send , nil 0020 leave "********* PRISM *************" == disasm: #@test_code.rb:24 (24,0)-(25,21)> local table (size: 1, argc: 0 [opts: 0, rest: -1, post: 0, block: -1, kw: -1@-1, kwrest: -1]) [ 1] name@0 0000 putstring "Prism" ( 24)[Li] 0002 setlocal name@0, 0 0005 putself ( 25)[Li] 0006 putobject "hello, " 0008 getlocal name@0, 0 0011 dup 0012 objtostring 0014 anytostring 0015 concatstrings 2 0017 send , nil 0020 leave ( 24) ``` Fixes ruby/prism#1609 commit 20f4f007644b841c71402a5ae64ee5373dc7b91a Author: Nobuyoshi Nakada AuthorDate: 2023-12-15 19:36:07 +0900 Commit: Nobuyoshi Nakada CommitDate: 2023-12-16 00:26:39 +0900 [ruby/rdoc] [DOC] nodoc for probably internal methods https://github.com/ruby/rdoc/commit/f7dd147a8c commit e15d690db147fb059a48f87bf639fdf0c006a22b Author: Nobuyoshi Nakada AuthorDate: 2023-12-15 19:35:16 +0900 Commit: Nobuyoshi Nakada CommitDate: 2023-12-16 00:26:37 +0900 [ruby/rdoc] [DOC] Add missing documents https://github.com/ruby/rdoc/commit/e4c90340d0 commit 578eb02b16218ce842a30bf794bf52a68e680a38 Author: Nobuyoshi Nakada AuthorDate: 2023-12-15 19:26:46 +0900 Commit: Nobuyoshi Nakada CommitDate: 2023-12-16 00:25:53 +0900 [ruby/rdoc] Require fileutils before using it https://github.com/ruby/rdoc/commit/edb2523018 commit b257181ccc9cf46cfcbe085083f3ebffcd8abf09 Author: Nobuyoshi Nakada AuthorDate: 2023-12-15 19:20:47 +0900 Commit: Nobuyoshi Nakada CommitDate: 2023-12-16 00:25:51 +0900 [ruby/rdoc] Remove unused method `RDoc::Encoding.remove_frozen_string_literal` https://github.com/ruby/rdoc/commit/7a8e9a97fa commit f38814564b1c8d9394ae4568fb0dfd2bbbfe3440 Author: Kevin Newton AuthorDate: 2023-12-16 00:07:55 +0900 Commit: git[bot] CommitDate: 2023-12-16 00:19:50 +0900 [ruby/prism] Fix eval parsing depth https://github.com/ruby/prism/commit/89bf7a4948 commit fe9b42f024eb3724b0853c914916ea7a97fd30a6 Author: Kevin Newton AuthorDate: 2023-12-15 22:48:39 +0900 Commit: git[bot] CommitDate: 2023-12-16 00:03:49 +0900 [ruby/prism] Invalid pinned locals in pattern matching https://github.com/ruby/prism/commit/3a67b37a56 commit 1cd4b59e8cf56850a87a56194e7096db63f40204 Author: Samuel Giddins AuthorDate: 2023-12-14 11:11:42 +0900 Commit: git[bot] CommitDate: 2023-12-15 23:53:10 +0900 [rubygems/rubygems] Save array allocation for every dependency in Gemfile Only need to check for lack of git key when branch option is present https://github.com/rubygems/rubygems/commit/ebfca1b389 commit ca7f7c0f516512c7e5b19aa74e05939b27bb37e4 Author: Samuel Giddins AuthorDate: 2023-12-15 18:40:34 +0900 Commit: git[bot] CommitDate: 2023-12-15 23:48:25 +0900 [rubygems/rubygems] Refactor vendoring to allow validating vendoring is reproducible Helps ensure that unsuspecting diffs to the vendored code arent accidentally introduced https://github.com/rubygems/rubygems/commit/7c425d49dd commit 10a0545b6e0a4ed5eee1edff725f7955b2f26914 Author: Burdette Lamar AuthorDate: 2023-12-15 23:39:12 +0900 Commit: GitHub CommitDate: 2023-12-15 23:39:12 +0900 [DOC] RDoc for Complex (#9243) commit 7cbc08b388cfc6d9bd2023c313165bff37ba2c11 Author: Nobuyoshi Nakada AuthorDate: 2023-12-15 21:49:58 +0900 Commit: Nobuyoshi Nakada CommitDate: 2023-12-15 22:37:38 +0900 Follow removed conflict files After editing a conflict, continue without removed files. commit 854ff25f4f4a0c1183b742bd5077985236348c57 Author: Kevin Newton AuthorDate: 2023-12-15 22:26:33 +0900 Commit: git[bot] CommitDate: 2023-12-15 22:26:40 +0900 [ruby/prism] Add TODO comment https://github.com/ruby/prism/commit/885d1d78cb commit 16830a47830d6e780b7ce649f0247bdddd32f51d Author: TSUYUSATO Kitsune AuthorDate: 2023-12-11 12:29:20 +0900 Commit: git[bot] CommitDate: 2023-12-15 22:25:54 +0900 [ruby/prism] Add an error for `in` keyword in arguments Fix https://github.com/ruby/prism/pull/2026 https://github.com/ruby/prism/commit/c4b41cd477 commit 04f7be612625a51523c7ae546a8774aea1a8fa12 Author: Satoshi Tagomori AuthorDate: 2023-12-15 15:57:51 +0900 Commit: Yusuke Endoh CommitDate: 2023-12-15 21:36:27 +0900 loading/testing in different processes for multiple runs commit 7c72755da8577947f564aeb264a201f62b032996 Author: David Rodríguez AuthorDate: 2023-12-15 06:59:15 +0900 Commit: git[bot] CommitDate: 2023-12-15 20:52:38 +0900 [rubygems/rubygems] Fix `ruby setup.rb` leaving traces in source folder It's the `Gem::Installer` below what installs executables, and the code being deleted here is now actually creating a `gems/` folder in the root of the source repo when running `ruby setup.rb`. https://github.com/rubygems/rubygems/commit/0e69a8b0d6 commit 4d5bfa7c3b3f21ed32f32542d66922d0481004bb Author: Nobuyoshi Nakada AuthorDate: 2023-12-15 15:39:14 +0900 Commit: Nobuyoshi Nakada CommitDate: 2023-12-15 15:39:14 +0900 Ignore the spcial case of target_cpu On Windows, x86_64 is called as x64. commit 2c2c6bc3fac34b7dd7ecafd08c7f12fc47988799 Author: Nobuyoshi Nakada AuthorDate: 2023-12-15 15:19:16 +0900 Commit: Nobuyoshi Nakada CommitDate: 2023-12-15 15:19:16 +0900 Fix `ARCH_FLAG` when cross-compiling on macOS commit 1e5c4026d5c75e6867f6e97de0aeaea55e62d26b Author: Nobuyoshi Nakada AuthorDate: 2023-12-15 14:10:02 +0900 Commit: Nobuyoshi Nakada CommitDate: 2023-12-15 14:10:02 +0900 Fix `ARCH_FLAG` when `--with-arch` with single CPU commit cc9aeec23e260a42fea9bf27835331ff76d24c4a Author: Hiroshi SHIBATA AuthorDate: 2023-12-15 15:14:48 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-15 15:14:48 +0900 Explained about test_for_warn_bundled_gems commit c3ae4b6ae12546a1b5adb33f8789a7bddd4739f1 Author: Hiroshi SHIBATA AuthorDate: 2023-12-15 15:06:48 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-15 15:06:53 +0900 Revert "[Bug #20060] Properly return matched gem name in case of EXACT" This reverts commit 75c40802cb06d83fc2c3d0eca6d904fa41307230. This change is now working correctly with warning cases. commit 8df46d54bf9722ed0ab84f24e5fa48fe2fecfdd5 Author: Hiroshi SHIBATA AuthorDate: 2023-12-15 14:49:46 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-15 15:05:13 +0900 Added test case of dash gem like net-smtp commit 9a204fb82e36dc30fc86827234e99ca6f55d442c Author: Hiroshi SHIBATA AuthorDate: 2023-12-15 14:48:10 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-15 15:05:13 +0900 Added test case of bootsnap commit 25a133ba17a0025451befecd4008b18de2c1e190 Author: Hiroshi SHIBATA AuthorDate: 2023-12-15 14:40:30 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-15 15:05:13 +0900 Added test case of bundle exec commit 66b82a4430a38dbbee0b69896743b5eed4c5badd Author: Hiroshi SHIBATA AuthorDate: 2023-12-15 14:37:39 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-15 15:05:13 +0900 Added test case of bundled gems dependencies commit 76c1ce4e379535ed92ebc2197563b36bfd8b2beb Author: Hiroshi SHIBATA AuthorDate: 2023-12-15 14:34:56 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-15 15:05:13 +0900 Added basic test case of bundled gems warning commit 8e37cd8a8bd2263c66243a35f25b5e741635c893 Author: David Rodríguez AuthorDate: 2023-12-15 00:02:00 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-15 15:04:36 +0900 Fix gem detection for names with dash commit b562efdf6d23d056764b334764a030eb72ea91a9 Author: Shugo Maeda AuthorDate: 2023-12-15 12:57:03 +0900 Commit: Shugo Maeda CommitDate: 2023-12-15 12:57:03 +0900 Bump up bundled net-ftp gem version to 0.3.3 commit 406d4bb59905903cf7b9fa62c2d590e963edda5c Author: Koichi Sasada AuthorDate: 2023-12-15 11:21:39 +0900 Commit: Koichi Sasada CommitDate: 2023-12-15 11:58:43 +0900 add a test proposed at https://bugs.ruby-lang.org/issues/20050#note-5 commit 7ba2506232d3fa6c4e82e3708c0ff746a1a8de5c Author: Koichi Sasada AuthorDate: 2023-12-15 03:42:40 +0900 Commit: Koichi Sasada CommitDate: 2023-12-15 11:58:43 +0900 check modifcation while ar->st * delete `ar_try_convert` but use `ar_force_convert_table` to make program simple. * `ar_force_convert_table` checks hash modification while calling `#hash` method with the following strategy: 1. copy keys (and vals) of ar_table 2. calc hashes from keys 3. check copied keys and hash's keys. if not matched, repeat from 1 fix [Bug #20050] commit 29e99c84ae8059cd308cf1c06be05f62c55cd68d Author: Jeremy Evans AuthorDate: 2023-12-15 11:44:13 +0900 Commit: Jeremy Evans CommitDate: 2023-12-15 11:44:13 +0900 Remove unused variables in test_call_op_asgn_keywords_mutable commit b98bd10f255d0afe33ba3c4410dd2c05c61695fb Author: Satoshi Tagomori AuthorDate: 2023-12-15 10:38:33 +0900 Commit: Yusuke Endoh CommitDate: 2023-12-15 11:09:31 +0900 stop warnings from running the test case requiring .so twice commit cfd91121ad71655ef9cea48450a0027a00a46f8f Author: Takashi Kokubun AuthorDate: 2023-12-15 10:24:06 +0900 Commit: Takashi Kokubun CommitDate: 2023-12-15 10:24:08 +0900 Trigger auto-request-review only for master branch commit 68020516bab1b885942450c48a9708ea2f726f68 Author: Takashi Kokubun AuthorDate: 2023-12-15 08:55:14 +0900 Commit: Takashi Kokubun CommitDate: 2023-12-15 08:55:15 +0900 [DOC] Reverse-merge YJIT release notes to NEWS commit 5587bd4b37cc01227ce5546b3350033bb1ef9775 Author: Jemma Issroff AuthorDate: 2023-12-15 06:44:38 +0900 Commit: Jemma Issroff CommitDate: 2023-12-15 07:11:54 +0900 [PRISM] Implement safe navigation in CallNodes This commit implements safe navigation for CallNodes, CallAndWriteNodes and CallOperatorWriteNodes commit 39c072d6f7846a99f64e52090a320576715325c5 Author: Victor Shepelev AuthorDate: 2023-12-15 06:33:33 +0900 Commit: GitHub CommitDate: 2023-12-15 06:33:33 +0900 [DOC] Enhance docs for WeakMap and WeakKeyMap (#9160) Enhance docs for WeakMap and WeakKeyMap * WeakKeyMap: more class-level explanations, more details on #getkey, fix a slight bug in code of #delete example; * WeekMap: a bit more detailed class- and method-level docs. commit 570d7b2c3e2ee39e07548dfe242b684ec794789d Author: Victor Shepelev AuthorDate: 2023-12-15 06:01:48 +0900 Commit: GitHub CommitDate: 2023-12-15 06:01:48 +0900 [DOC] Adjust some new features wording/examples. (#9183) * Reword Range#overlap? docs last paragraph. * Docs: add explanation about Queue#freeze * Docs: Add :rescue event docs for TracePoint * Docs: Enhance Module#set_temporary_name documentation * Docs: Slightly expand Process::Status deprecations * Fix MatchData#named_captures rendering glitch * Improve Dir.fchdir examples * Adjust Refinement#target docs commit d3deb1b8232a303dd40909e32f939bad3b24a8af Author: Kevin Newton AuthorDate: 2023-12-15 05:25:54 +0900 Commit: Kevin Newton CommitDate: 2023-12-15 05:26:01 +0900 [prism] Fix build with no asserts commit 8bbe835cd872a3af411cb6a950e2751c02060f3f Author: Kevin Newton AuthorDate: 2023-12-15 05:06:09 +0900 Commit: Kevin Newton CommitDate: 2023-12-15 05:06:09 +0900 Bump prism to version 0.19.0 commit d07fdc5edee219bbbd6262f909d636a509793cca Author: Ufuk Kayserilioglu AuthorDate: 2023-12-15 03:15:30 +0900 Commit: Jemma Issroff CommitDate: 2023-12-15 04:08:37 +0900 [PRISM] Fix keyword hash handling in method calls * Start using the renamed `PM_KEYWORD_HASH_NODE_FLAGS_SYMBOL_KEYS` flag to check if all keys of the keyword hash node are symbols. * For arguments passed as a hash, start marking them as `KW_SPLAT_MUT` only if the number of entries in the hash is greater than 1 (which is what the old compiler used to do). commit 295d97ab4dc826a4c2b812d254a6607c87534ed7 Author: Kevin Newton AuthorDate: 2023-12-14 01:34:05 +0900 Commit: Kevin Newton CommitDate: 2023-12-15 04:06:26 +0900 Pattern matching commit 019fff3a8656cadad93ba8d6db476428bd8d7a5e Author: Kevin Newton AuthorDate: 2023-12-15 02:48:25 +0900 Commit: git[bot] CommitDate: 2023-12-15 03:54:46 +0900 [ruby/prism] Fix parse result for nesting pattern matching https://github.com/ruby/prism/commit/ee6fc9ee87 commit 5a66832952fa1ee971406b797605f72cead6e9c4 Author: eileencodes AuthorDate: 2023-12-15 02:20:24 +0900 Commit: Jemma Issroff CommitDate: 2023-12-15 03:48:38 +0900 [Prism] Fix cvar or assignment instructions The instructions for `PM_CLASS_VARIABLE_OR_WRITE_NODE` were incorrect as they were missing a `putnil`, a `defined`, and a `branchunless`. I verified this is fixed via the instructions and running the following: `RUBY_ISEQ_DUMP_DEBUG=prism make test/csv/interface/test_read_write.rb`. These new instructions can't go in the defined function because `defined?(@@fop ||= 1)` should return "assignment" not "class variable". Instructions before: ``` "********* Ruby *************" == disasm: #@:1 (1,0)-(30,11)> 0000 putnil ( 30)[Li] 0001 defined class variable, :@@foo, true 0005 branchunless 14 0007 getclassvariable :@@foo, 0010 dup 0011 branchif 20 0013 pop 0014 putobject 1 0016 dup 0017 setclassvariable :@@foo, 0020 leave "********* PRISM *************" == disasm: #@:29 (29,0)-(29,11)> 0000 getclassvariable :@@foo, ( 29)[Li] 0003 dup 0004 branchif 13 0006 pop 0007 putobject 1 0009 dup 0010 setclassvariable :@@foo, 0013 leave ``` Instructions after: ``` "********* Ruby *************" == disasm: #@:1 (1,0)-(30,11)> 0000 putnil ( 30)[Li] 0001 defined class variable, :@@foo, true 0005 branchunless 14 0007 getclassvariable :@@foo, 0010 dup 0011 branchif 20 0013 pop 0014 putobject 1 0016 dup 0017 setclassvariable :@@foo, 0020 leave "********* PRISM *************" == disasm: #@:29 (29,0)-(29,11)> 0000 putnil ( 29)[Li] 0001 defined class variable, :@@foo, true 0005 branchunless 14 0007 getclassvariable :@@foo, 0010 dup 0011 branchif 20 0013 pop 0014 putobject 1 0016 dup 0017 setclassvariable :@@foo, 0020 leave ``` Fixes ruby/prism#2064 commit 7ac93e99a3db30ed41cbbe95df1d7be9a790b9cb Author: Jemma Issroff AuthorDate: 2023-12-14 02:17:22 +0900 Commit: Jemma Issroff CommitDate: 2023-12-15 03:45:41 +0900 [PRISM] Account for multiple anonymous locals This commit adjusts the local table size to be consistent regardless of the number of anonymous locals. commit 01f21d57297f1e6820a6a374ccf9c432c6178038 Author: Ufuk Kayserilioglu AuthorDate: 2023-12-14 07:14:18 +0900 Commit: git[bot] CommitDate: 2023-12-15 03:05:54 +0900 [ruby/prism] Fix the implementation of the flag on keyword hash nodes The previous implementation was incorrect since it was just checking for all keys in assoc nodes to be static literals but the actual check is that all keys in assoc nodes must be symbol nodes. This commit fixes that implementation, and, also, aliases the flag to `PM_KEYWORD_HASH_NODE_FLAGS_SYMBOL_KEYS` so that ruby/ruby can start using the new flag name. I intend to later change the real flag name to `PM_KEYWORD_HASH_NODE_FLAGS_SYMBOL_KEYS` and remove the alias. https://github.com/ruby/prism/commit/f5099c79ce commit c5e3d6da9cc7199128218711b89df45c8bf7c6f1 Author: Peter Zhu AuthorDate: 2023-12-14 04:09:27 +0900 Commit: Peter Zhu CommitDate: 2023-12-15 02:22:38 +0900 Implement Write Barriers on IO::Buffer Benchmark: ``` require "benchmark" puts(Benchmark.measure do ary = 1_000_000.times.map { IO::Buffer.for("") } 10.times { GC.start(full_mark: false) } end) ``` Before: ``` 14.330119 0.051497 14.381616 ( 14.445106) ``` After: ``` 7.481152 0.040166 7.521318 ( 7.535209) ``` commit 157e6c8a512968dc9f82d7f81606eeb3266cf6bb Author: Jemma Issroff AuthorDate: 2023-12-14 20:58:50 +0900 Commit: Jemma Issroff CommitDate: 2023-12-15 01:46:54 +0900 [PRISM] Check for static literal, excluding array, hash, range commit e71f0117137c30db1dd694aa2c91c82174fa05df Author: Jemma Issroff AuthorDate: 2023-12-14 06:41:45 +0900 Commit: Jemma Issroff CommitDate: 2023-12-15 01:46:54 +0900 [PRISM] Fix bugs in compiling optional keyword parameters This PR fixes two bugs when compiling optional keyword parameters: - It moves keyword parameter compilation to STEP 5 in the parameters sequence, where the rest of compilation happens. This is important because keyword parameter compilation relies on the value of body->param.keyword->bits_start which gets set in an earlier step - It compiles array and hash values for keyword parameters, which it didn't previously commit 3658798dbb60fe55beaebc157ba43c8fe617c4a0 Author: TSUYUSATO Kitsune AuthorDate: 2023-12-15 01:30:22 +0900 Commit: git[bot] CommitDate: 2023-12-15 01:39:05 +0900 [ruby/prism] Make equality operators non-associative Fix https://github.com/ruby/prism/pull/2073 https://github.com/ruby/prism/commit/0f747d9240 commit 8e1c148fd90b2c32044ef310a0a312bca89c6fea Author: Jemma Issroff AuthorDate: 2023-12-15 00:19:31 +0900 Commit: Jemma Issroff CommitDate: 2023-12-15 01:14:45 +0900 [PRISM] Use frozen flag on StringNode commit a18819e65fa2dd3135909df81534937dadafb6ab Author: Jeremy Evans AuthorDate: 2023-12-13 09:48:26 +0900 Commit: Jeremy Evans CommitDate: 2023-12-15 01:13:43 +0900 Fix op asgn method calls passing mutable keyword splats When passing the keyword splat to [], it cannot be mutable, because mutating the keyword splat inside [] would result in changes to the keyword splat passed to []=. commit 247ce712fcf93d28ceb359b66dfcf8f76e2c731d Author: Burdette Lamar AuthorDate: 2023-12-15 01:09:17 +0900 Commit: GitHub CommitDate: 2023-12-15 01:09:17 +0900 [DOC] RDoc for Complex (#9231) commit a79a1d30289b326c8b6c6deb00f1431c693a4b50 Author: David Rodríguez AuthorDate: 2023-12-14 22:16:59 +0900 Commit: git[bot] CommitDate: 2023-12-15 00:04:22 +0900 [rubygems/rubygems] Upgrade vendored libraries To match the versions that will be included in final ruby release. https://github.com/rubygems/rubygems/commit/84394919fb commit 912016f626fab3e79e3ef8d9da53d1b148c8b5bf Author: Peter Zhu AuthorDate: 2023-12-14 04:25:19 +0900 Commit: Peter Zhu CommitDate: 2023-12-14 22:52:32 +0900 Call obj_free for T_DATA, T_FILE objects on exit Previously, T_DATA and T_FILE objects did not have their instance variables freed on exit which would be reported as a memory leak with RUBY_FREE_ON_EXIT. This commit changes it to use obj_free which also frees the generic instance variables. Co-authored-by: Alan Wu commit e3631277c37861d5e99fbefd8bd3eeefc0120825 Author: Hiroshi SHIBATA AuthorDate: 2023-12-14 21:13:29 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-14 21:22:49 +0900 Removed duplicated LICENSE files commit 612616925b3d5247748b8df98a13a70f74f8b4c3 Author: Vít Ondruch AuthorDate: 2023-12-09 00:38:51 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-14 21:22:49 +0900 [rubygems/rubygems] Allow "default_user_install" to be overridden. For Ruby re-distributors, automatic user-install might be the right default. Therefore printing warning about installing into user directory is not always desirable. Let the default_user_install method be customizable. https://github.com/rubygems/rubygems/commit/2320dba544 commit 45b511433d652c46d5652ab295367f41341697af Author: David Rodríguez AuthorDate: 2023-12-13 22:42:21 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-14 21:22:48 +0900 [rubygems/rubygems] Improve install advice when some gems are not found This problem is quite specific to our dev environment, but I guess the fix could be handy for other situations. After merging a change to treat default gems as regular gems, I get this when trying to run `rubocop` on our repo: ``` $ bin/rubocop --only Performance/RegexpMatch Could not find json-2.6.3 in locally installed gems Run `bundle install --gemfile /Users/deivid/code/rubygems/rubygems/tool/bundler/lint_gems.rb` to install missing gems. ``` However, when running the suggested command, nothing changes and I still get the same error: ``` $ bundle install --gemfile /Users/deivid/code/rubygems/rubygems/tool/bundler/lint_gems.rb Using ast 2.4.2 Using bundler 2.4.10 Using json 2.6.3 Using parallel 1.23.0 Using racc 1.7.1 Using parser 3.2.2.3 Using rainbow 3.1.1 Using regexp_parser 2.8.1 Using rexml 3.2.5 Using rubocop-ast 1.29.0 Using ruby-progressbar 1.13.0 Using unicode-display_width 2.4.2 Using rubocop 1.52.1 Using rubocop-performance 1.14.2 Bundle complete! 2 Gemfile dependencies, 14 gems now installed. Use `bundle info [gemname]` to see where a bundled gem is installed. $ bin/rubocop --only Performance/RegexpMatch Could not find json-2.6.3 in locally installed gems Run `bundle install --gemfile /Users/deivid/code/rubygems/rubygems/tool/bundler/lint_gems.rb` to install missing gems. ``` The problem is that our `bin/rubocop` script uses the development version of Bundler (which has the change causing the problem), but the advice recommands the default version of Bundler, which does not yet have the change. This commit changes the advice to recommend to use the same version of Bundler that run into the problem in the first place. So in the above situation you now get: ``` $ bin/rubocop --only Performance/RegexpMatch Could not find json-2.6.3 in locally installed gems Run `/Users/deivid/code/rubygems/rubygems/bundler/exe/bundle install --gemfile /Users/deivid/code/rubygems/rubygems/tool/bundler/lint_gems.rb` to install missing gems. ``` And running that fixes the problem: ``` $ /Users/deivid//rubygems/rubygems/bundler/exe/bundle install --gemfile /Users/deivid/code/rubygems/rubygems/tool/bundler/lint_gems.rb Fetching gem metadata from https://rubygems.org/......... Fetching json 2.6.3 Installing json 2.6.3 with native extensions Bundle complete! 2 Gemfile dependencies, 14 gems now installed. Use `bundle info [gemname]` to see where a bundled gem is installed. ``` https://github.com/rubygems/rubygems/commit/10a9588c6d commit d718654bb1b6b440b664fe6f35424360b13bab6e Author: David Rodríguez AuthorDate: 2023-12-13 05:32:17 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-14 21:22:48 +0900 [rubygems/rubygems] Remove extension building sync stuff no longer present in RubyGems https://github.com/rubygems/rubygems/commit/59a85388b9 commit 41095f4de058c1a9d571c3c7e745c748d6c07cbc Author: David Rodríguez AuthorDate: 2023-12-13 05:49:12 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-14 21:22:48 +0900 [rubygems/rubygems] RubyGems > 3.2.0.rc.1 is now always provided https://github.com/rubygems/rubygems/commit/929b521f3a commit 778438d423dac10d1a63f826cfc4dc18ca4c0b66 Author: David Rodríguez AuthorDate: 2023-12-13 05:28:57 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-14 21:22:48 +0900 [rubygems/rubygems] Gem::Specification always has `default_stubs` now https://github.com/rubygems/rubygems/commit/30db1eb4a5 commit 5cf6f7f8859a0418bbbe2b608a88557d4f06e098 Author: David Rodríguez AuthorDate: 2023-12-13 05:21:35 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-14 21:22:48 +0900 [rubygems/rubygems] Remove more methods now defined in all RubyGems versions https://github.com/rubygems/rubygems/commit/e015200ffa commit 7564038864bcf7c3cfb2f602e318e9beae17b2f7 Author: David Rodríguez AuthorDate: 2023-12-13 05:17:28 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-14 21:22:48 +0900 [rubygems/rubygems] Remove check only necessary for ancient RubyGems https://github.com/rubygems/rubygems/commit/ffa2f03489 commit 04dd2a8aae84f58009d230304029cf4af9a6d296 Author: David Rodríguez AuthorDate: 2023-12-13 05:15:38 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-14 21:22:48 +0900 [rubygems/rubygems] This patch should be no longer needed https://github.com/rubygems/rubygems/commit/1139e90931 commit b45c1523a89133daa31c483e97f7d28593bb7b01 Author: David Rodríguez AuthorDate: 2023-12-13 05:06:20 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-14 21:22:48 +0900 [rubygems/rubygems] Gem::Specification.find_all_by_name is always defined now https://github.com/rubygems/rubygems/commit/1d61c7686b commit b300f5a0e1b75dfd27d58890521a1085d44284b3 Author: David Rodríguez AuthorDate: 2023-12-14 05:23:07 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-14 21:22:48 +0900 [rubygems/rubygems] Revert "Improve default gem handling" This reverts commit https://github.com/rubygems/rubygems/commit/091b4fcf2b99. https://github.com/rubygems/rubygems/commit/dcade3235f commit a10c11a66bae7ec4bfb56d0ccfe74a0c6681fc77 Author: Matt Valentine-House AuthorDate: 2023-12-13 23:40:34 +0900 Commit: Jemma Issroff CommitDate: 2023-12-14 21:01:19 +0900 [PRISM] Add anon KW args to the block local table commit e51f9e9f75cc1dde9234836fa92077d71b3c5141 Author: Satoshi Tagomori AuthorDate: 2023-12-08 15:06:12 +0900 Commit: Nobuyoshi Nakada CommitDate: 2023-12-14 17:39:42 +0900 rb_ext_resolve_symbol: C API to resolve and return externed symbols [Feature #20005] This is a C API for extensions to resolve and get function symbols of other extensions. Extensions can check the expected symbol is correctly loaded and accessible, and use it if it is available. Otherwise, extensions can raise their own error to guide users to setup their environments correctly and what's missing. commit 8a37df8c8bc0311c4822ee989087d212af2bf73f Author: Satoshi Tagomori AuthorDate: 2023-12-07 20:38:53 +0900 Commit: Nobuyoshi Nakada CommitDate: 2023-12-14 17:39:42 +0900 dln_symbol: make dln_sym accessible Ruby internally The symbol resolved by dln_symbol will eventually be passed to extensions. The error handling of dln_sym is also separated into dln_sym_func because the new call resolving symbols will not raise LoadError. commit 1b1d5e757e81ec243062a8919ddc76d017c34a54 Author: Shugo Maeda AuthorDate: 2023-12-14 16:38:39 +0900 Commit: Shugo Maeda CommitDate: 2023-12-14 16:38:39 +0900 Bump up bundled net-ftp gem version to 0.3.2 commit 26145a27f6b960bd607cdd2f9680eba14f84ac1a Author: Shugo Maeda AuthorDate: 2023-12-14 15:51:12 +0900 Commit: Shugo Maeda CommitDate: 2023-12-14 15:51:12 +0900 Bump up bundled net-ftp gem version to 0.3.1 commit b7e89d4b175a88be333134066b595d1e34c33fd3 Author: Kevin Newton AuthorDate: 2023-12-14 11:35:42 +0900 Commit: git[bot] CommitDate: 2023-12-14 11:43:32 +0900 [ruby/prism] Fix hash pattern rest https://github.com/ruby/prism/commit/43c4232cfc commit beefce1444adafac484bb69b625de2b30e7e80d2 Author: Drew Stevenson AuthorDate: 2023-12-01 13:35:33 +0900 Commit: git[bot] CommitDate: 2023-12-14 09:06:05 +0900 [rubygems/rubygems] Warn for duplicate meta data links Match order of METADATA_LINK_KEYS to order used by rubygems.org in Links model. Add missing download_uri key. https://github.com/rubygems/rubygems/commit/d2922cd6e9 commit d7dad644658697a05949b66e736a34fb772771de Author: John Hawthorn AuthorDate: 2023-12-13 13:57:02 +0900 Commit: John Hawthorn CommitDate: 2023-12-14 08:26:52 +0900 Unlock freelist before assigning Co-authored-by: Matthew Draper commit c1f4bfd41fa7e1fa23ef6803349ac009debdf61f Author: Martin Emde AuthorDate: 2023-12-14 06:46:04 +0900 Commit: git[bot] CommitDate: 2023-12-14 07:50:45 +0900 [rubygems/rubygems] Revert "Merge pull request #7167 from nevinera/add-json-output-option-to-bundle-outdated" This reverts commit https://github.com/rubygems/rubygems/commit/a4ac5116b8ea, reversing changes made to https://github.com/rubygems/rubygems/commit/8a6b180d0ae5. https://github.com/rubygems/rubygems/commit/a1efe4015d commit 5a0cbc934428b3babdce6f5d014c30afcb84e567 Author: Hiroshi SHIBATA AuthorDate: 2023-12-13 16:38:15 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-14 07:48:08 +0900 Detect bootsnap from all frames commit 8b0c62696203daba815fa4e6d1c08dc143b3cc04 Author: Hiroshi SHIBATA AuthorDate: 2023-12-12 16:04:49 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-14 07:48:08 +0900 Skip warning feature with Bootsnap Bootsnap modified full feature path to require. We can't handle it for warning correctly. commit 75c40802cb06d83fc2c3d0eca6d904fa41307230 Author: Akira Matsuda AuthorDate: 2023-12-14 02:30:04 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-14 07:47:56 +0900 [Bug #20060] Properly return matched gem name in case of EXACT this follows up 4e6861d3376eb7857d2b0a947c97b6fec8e5bf37 commit baf2ec2ca8127cd610a3681a1e84ebcb404fe8f2 Author: Samuel Giddins AuthorDate: 2023-12-13 20:46:10 +0900 Commit: git[bot] CommitDate: 2023-12-14 07:00:26 +0900 [rubygems/rubygems] Use match? when regexp match data is unused Improved performance / reduced allocations https://github.com/rubygems/rubygems/commit/b04726c9a7 commit b266890dab38d12ad52288d5edf60f885ae5b8ce Author: Takashi Kokubun AuthorDate: 2023-12-14 06:29:37 +0900 Commit: GitHub CommitDate: 2023-12-14 06:29:37 +0900 YJIT: Add --yjit-disable to help and reorder it (#9230) commit 7f4b271a61a11b0254304b78db72fd2c954a4370 Author: Martin Emde AuthorDate: 2023-12-14 04:15:51 +0900 Commit: git[bot] CommitDate: 2023-12-14 05:28:37 +0900 [rubygems/rubygems] Store Checksum::Store indexed by spec.lock_name https://github.com/rubygems/rubygems/commit/34d6c6c72f commit 14c7895c21bee44934336a9a9ea94aefc5cc7879 Author: Takashi Kokubun AuthorDate: 2023-12-14 04:50:35 +0900 Commit: Takashi Kokubun CommitDate: 2023-12-14 04:50:35 +0900 Fix a typo in yjit.md commit 31c0ea20e5492925ac971991937e30524da5043d Author: Ufuk Kayserilioglu AuthorDate: 2023-12-13 08:47:07 +0900 Commit: Jemma Issroff CommitDate: 2023-12-14 04:15:09 +0900 [PRISM] Add a test with a non-static-literal hash key commit 6aa26af683616cf908f0251dbb8ffde380e0c314 Author: Samuel Giddins AuthorDate: 2023-12-13 22:01:24 +0900 Commit: git[bot] CommitDate: 2023-12-14 04:02:24 +0900 [rubygems/rubygems] Add 3.4 as a supported ruby version Since ruby trunk will be 3.4 very soon https://github.com/rubygems/rubygems/commit/36dd9a35dc commit 110dbf62acc307ea2e3ce57ddaa89fc734a715c5 Author: eileencodes AuthorDate: 2023-12-13 05:52:53 +0900 Commit: Jemma Issroff CommitDate: 2023-12-14 03:42:17 +0900 [Prism] Fix InterpolatedMatchLastLine Instructions I looked at this at RubyConf with Kevin, and we noticed that there was a `putobject` empty string missing from the instructions. I just got back around to implementing this and pushing a PR and while doing that noticed that we also have a `getspecial` when we want a `getglobal`. This change adds the `putobject` instruction and replaces the `getspecial` with a `getglobal`. If we look at the parsetree for the following code: ```ruby $pit = '.oo'; if /"#{$pit}"/mix; end ``` We can see it has a `NODE_GVAR` and the [Ruby compiler](https://github.com/ruby/ruby/blob/a4b43e92645e46ee5a8c9af42d3de57cd052e87c/compile.c#L10024-L10030) shows that should use `getglobal. ``` @ NODE_SCOPE (id: 14, line: 1, location: (1,0)-(22,36)) +- nd_tbl: (empty) +- nd_args: | (null node) +- nd_body: @ NODE_BLOCK (id: 12, line: 22, location: (22,0)-(22,36)) +- nd_head (1): | @ NODE_GASGN (id: 0, line: 22, location: (22,0)-(22,12))* | +- nd_vid: :$pit | +- nd_value: | @ NODE_STR (id: 1, line: 22, location: (22,7)-(22,12)) | +- nd_lit: ".oo" +- nd_head (2): @ NODE_IF (id: 11, line: 22, location: (22,14)-(22,36))* +- nd_cond: | @ NODE_MATCH2 (id: 10, line: 22, location: (22,14)-(22,36)) | +- nd_recv: | | @ NODE_DREGX (id: 2, line: 22, location: (22,17)-(22,31)) | | +- nd_lit: "\"" | | +- nd_next->nd_head: | | | @ NODE_EVSTR (id: 4, line: 22, location: (22,19)-(22,26)) | | | +- nd_body: | | | @ NODE_GVAR (id: 3, line: 22, location: (22,21)-(22,25)) | | | +- nd_vid: :$pit | | +- nd_next->nd_next: | | @ NODE_LIST (id: 7, line: 22, location: (22,26)-(22,27)) | | +- as.nd_alen: 1 | | +- nd_head: | | | @ NODE_STR (id: 6, line: 22, location: (22,26)-(22,27)) | | | +- nd_lit: "\"" | | +- nd_next: | | (null node) | +- nd_value: | @ NODE_GVAR (id: 9, line: 22, location: (22,14)-(22,36)) | +- nd_vid: :$_ +- nd_body: | @ NODE_BEGIN (id: 8, line: 22, location: (22,32)-(22,32)) | +- nd_body: | (null node) +- nd_else: (null node) ``` I'm struggling with writing a failing test, but the before/after instructions show that `getglobal` is correct here. I compared the instructions for the other `InterpolatedMatchLastLine` node tests and they also used `getglobal`. I've edited the existing `InterpolatedLastMatchLineNode` test so that it will use that instruction when copied out of the test. Without the quotes it thinks it's just a `MatchLastLineNode`. Incorrect instructions: ``` "********* Ruby *************" == disasm: #@:1 (1,0)-(22,36)> 0000 putstring ".oo" ( 22)[Li] 0002 setglobal :$pit 0004 putobject "\"" 0006 getglobal :$pit 0008 dup 0009 objtostring 0011 anytostring 0012 putobject "\"" 0014 toregexp 7, 3 0017 getglobal :$_ 0019 send , nil 0022 branchunless 30 0024 jump 26 0026 putnil 0027 jump 31 0029 pop 0030 putnil 0031 leave "********* PRISM *************" == disasm: #@:21 (21,0)-(21,36)> 0000 putstring ".oo" ( 21)[Li] 0002 setglobal :$pit 0004 putobject "\"" 0006 getglobal :$pit 0008 dup 0009 objtostring 0011 anytostring 0012 putobject "\"" 0014 toregexp 7, 3 0017 getspecial 0, 0 0020 send , nil 0023 branchunless 31 0025 jump 27 0027 putnil 0028 jump 32 0030 pop 0031 putnil 0032 leave ``` Fixed instructions: ``` == disasm: #@:1 (1,0)-(22,36)> 0000 putstring ".oo" ( 22)[Li] 0002 setglobal :$pit 0004 putobject "\"" 0006 getglobal :$pit 0008 dup 0009 objtostring 0011 anytostring 0012 putobject "\"" 0014 toregexp 7, 3 0017 getglobal :$_ 0019 send , nil 0022 branchunless 30 0024 jump 26 0026 putnil 0027 jump 31 0029 pop 0030 putnil 0031 leave "********* PRISM *************" == disasm: #@:21 (21,0)-(21,36)> 0000 putstring ".oo" ( 21)[Li] 0002 setglobal :$pit 0004 putobject "\"" 0006 getglobal :$pit 0008 dup 0009 objtostring 0011 anytostring 0012 putobject "\"" 0014 toregexp 7, 3 0017 getglobal :$_ 0019 send , nil 0022 branchunless 30 0024 jump 26 0026 putnil 0027 jump 31 0029 pop 0030 putnil 0031 leave ``` commit ea4a4c302cf1733ce6c84ffb641ab2c43846f7de Author: Takashi Kokubun AuthorDate: 2023-12-14 03:28:19 +0900 Commit: Takashi Kokubun CommitDate: 2023-12-14 03:28:20 +0900 [PRISM] Fix a -Wformat-zero-length warning ../prism_compile.c: In function ‘pm_compile_node’: ../prism_compile.c:2330:20: warning: zero-length gnu_printf format string [-Wformat-zero-length] 2330 | rb_bug(""); | ^~ commit 02528f647d4d217a574eb2518dbb925c937dded6 Author: John Hawthorn AuthorDate: 2023-12-13 11:34:14 +0900 Commit: John Hawthorn CommitDate: 2023-12-14 03:20:11 +0900 [PRISM] Use xcalloc for iseq id table We use xfree on the other end, so we need to use a form of xmalloc here. Co-authored-by: Matthew Draper commit b55de590f3344dcedaafba8bcf2a249c9f0c4fc5 Author: John Hawthorn AuthorDate: 2023-12-13 11:32:18 +0900 Commit: John Hawthorn CommitDate: 2023-12-14 03:20:11 +0900 [PRISM] Fix st_table memory leak Co-authored-by: Matthew Draper commit a3b48ac9ad8a5d4eb7ae6c3d4fe9d040361daa7a Author: Alan Wu AuthorDate: 2023-12-14 02:11:49 +0900 Commit: Aaron Patterson CommitDate: 2023-12-14 02:43:09 +0900 Fix memory leak in Hash#compare_by_identity We didn't free the old ST before overwriting it which caused a leak. Found with RUBY_FREE_ON_EXIT. Co-authored-by: Peter Zhu commit cc86fa8416b571e2d833157b852dee31a0d2f731 Author: Takashi Kokubun AuthorDate: 2023-12-14 02:38:18 +0900 Commit: Takashi Kokubun CommitDate: 2023-12-14 02:40:54 +0900 Skip an unstable test on MinGW This test fails fairly frequently on MinGW: https://github.com/ruby/ruby/actions/runs/7195712496/job/19598924253#step:11:168 https://github.com/ruby/ruby/actions/runs/7191246799/job/19585627182#step:11:168 and we aren't actively working on stabilizing tests for MinGW. commit 0f1c7e3bcb2ee0cb38d228ba0d23f52ceef5623c Author: Takashi Kokubun AuthorDate: 2023-12-14 02:36:06 +0900 Commit: GitHub CommitDate: 2023-12-14 02:36:06 +0900 RJIT: Just skip generating code for aarch64/arm64 (#9221) commit c83a648fc827ac1430bd1f08f5af19f7174e02aa Author: tomoya ishida AuthorDate: 2023-12-14 02:05:30 +0900 Commit: git[bot] CommitDate: 2023-12-14 02:05:35 +0900 [ruby/irb] Remove unused lvar in mesure command test (https://github.com/ruby/irb/pull/814) https://github.com/ruby/irb/commit/320178b120 commit a4b43e92645e46ee5a8c9af42d3de57cd052e87c Author: David Rodríguez AuthorDate: 2023-12-13 21:03:00 +0900 Commit: git[bot] CommitDate: 2023-12-14 00:47:43 +0900 [rubygems/rubygems] Add missing resolv, timeout, and net-protocol licenses https://github.com/rubygems/rubygems/commit/00694651a3 commit f8ddcecbdf34b8d33ed4311b34d498d4ff380a3e Author: Peter Zhu AuthorDate: 2023-12-13 00:45:59 +0900 Commit: Peter Zhu CommitDate: 2023-12-14 00:39:06 +0900 [Bug #20061] Clear mark bits when rb_free_on_exit When compiling with cppflags=-DRGENGC_CHECK_MODE, the following crashes: ``` $ RUBY_FREE_ON_EXIT=1 ./miniruby -e 0 -e: [BUG] obj_free: RVALUE_MARKED(0x0000000103570020 [3LM ] T_CLASS (anon)) != FALSE ``` This commit clears the mark bits when rb_free_on_exit is enabled. commit 0d53dba7ce900387397610c060cfa24758fc806a Author: Jeremy Evans AuthorDate: 2023-12-13 09:58:20 +0900 Commit: Jeremy Evans CommitDate: 2023-12-14 00:05:21 +0900 Make String#chomp! raise ArgumentError for 2+ arguments if string is empty String#chomp! returned nil without checking the number of passed arguments in this case. commit c42e4a38e9839fe3380566727304f3fd75a6506a Author: Jeremy Evans AuthorDate: 2023-12-09 09:39:41 +0900 Commit: Jeremy Evans CommitDate: 2023-12-14 00:05:21 +0900 Fix tool/ln_sr.rb passing 2 arguments to String#chomp! I'm guessing String#sub! was desired here. commit 9eba7a08920102747eb9dceeedd8d7c080515aac Author: Matt Valentine-House AuthorDate: 2023-12-12 07:35:13 +0900 Commit: Jemma Issroff CommitDate: 2023-12-13 23:33:07 +0900 [PRISM] Break nodes should add an entry to the parent catch table commit cb8a9851ca4e78795900cde2fb1147ec3a1192d7 Author: Matt Valentine-House AuthorDate: 2023-12-12 00:33:52 +0900 Commit: Jemma Issroff CommitDate: 2023-12-13 23:33:07 +0900 [PRISM] Remove errant NOP when redo_label is set commit 9267dbdd7ad1f41116a89c2ce044b776274afc44 Author: Matt Valentine-House AuthorDate: 2023-12-12 00:27:46 +0900 Commit: Jemma Issroff CommitDate: 2023-12-13 23:33:07 +0900 [PRISM] Generate instruction for when redo_label is set commit f390c51b15c470590a416d0def51ea1cca1bd74b Author: Ufuk Kayserilioglu AuthorDate: 2023-12-13 08:37:50 +0900 Commit: Jemma Issroff CommitDate: 2023-12-13 22:16:11 +0900 [PRISM] Use `PM_KEYWORD_HASH_NODE_FLAGS_STATIC_KEYS` flag in compiler commit 798a89fae1d7da1c0dd4282e9e16ab8bbf993b55 Author: Jemma Issroff AuthorDate: 2023-12-13 05:56:03 +0900 Commit: Jemma Issroff CommitDate: 2023-12-13 22:11:45 +0900 [PRISM] If receiver on CallNode is SelfNode, use FCALL flags commit 1ad991c54d7d890527050a54899265da21a677c2 Author: eileencodes AuthorDate: 2023-12-13 04:24:00 +0900 Commit: Jemma Issroff CommitDate: 2023-12-13 22:11:21 +0900 [PRISM] Fix attrset edge cases In some cases code may look like an attrset ID but should actually return the value of the method, not the passed values. In ruby/prism#2051 a flag was added when we have a attribute write call. I used this flag to add the proper instructions when we have a real attrset instead of using `rb_is_attrset_id` which was kind of hacky anyway. The value that should be returned in the newly added test is 42, not 2. Previously the changes we had made returned 2. Related to ruby/prism#1715 commit 36ca99b343ee8847beb4b7e0be112f75af64109f Author: Alex Koval AuthorDate: 2023-12-13 19:39:48 +0900 Commit: git[bot] CommitDate: 2023-12-13 21:17:57 +0900 [ruby/prism] fix typo in docs https://github.com/ruby/prism/commit/d7fbc09345 commit 745ab3e4c748ebf3b22278d7ad33c7abcf1f6016 Author: tomoya ishida AuthorDate: 2023-12-13 20:06:21 +0900 Commit: git[bot] CommitDate: 2023-12-13 20:06:26 +0900 [ruby/irb] Warn and do nothing if block is passed to measure command (https://github.com/ruby/irb/pull/813) https://github.com/ruby/irb/commit/e79a90a1e6 commit a7ad9f38367b729d49db78e7cbe13922d3ff70ee Author: Hiroshi SHIBATA AuthorDate: 2023-12-13 16:18:35 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-13 17:30:48 +0900 We need only one line for detecting caller gem name commit e282d7b880c3ac394ad8d41bde858c4534fb3188 Author: Takashi Kokubun AuthorDate: 2023-12-13 17:05:11 +0900 Commit: Takashi Kokubun CommitDate: 2023-12-13 17:05:12 +0900 Avoid warning --jit when only YJIT is enabled commit 75f4a687ed54e3b1863ba1767c666a0bea809c8a Author: Nobuyoshi Nakada AuthorDate: 2023-12-13 16:28:22 +0900 Commit: GitHub CommitDate: 2023-12-13 16:28:22 +0900 Fix a typo for `RJIT_TARGET_OK` (#8222) commit 20a09387d163b6d4ec77d1859f1cac480991ce9e Author: Takashi Kokubun AuthorDate: 2023-12-13 16:24:07 +0900 Commit: Takashi Kokubun CommitDate: 2023-12-13 16:24:19 +0900 Skip a GC test for RJIT It randomly fails like this: https://github.com/ruby/ruby/actions/runs/7191443542/job/19586164973 commit 5f5f8dbbb6a7861e9c591ad09149944a5adf5a71 Author: Hiroshi SHIBATA AuthorDate: 2023-12-13 15:04:13 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-13 15:11:21 +0900 [ruby/resolv] Bump up 0.3.0 https://github.com/ruby/resolv/commit/22153c2a45 commit 39023792dbded9250040224accda18c0db14c5bc Author: Hiroshi SHIBATA AuthorDate: 2023-12-13 14:55:10 +0900 Commit: git[bot] CommitDate: 2023-12-13 14:58:25 +0900 [ruby/io-console] Bump up 0.7.0 https://github.com/ruby/io-console/commit/3e5586e632 commit 06edde22f462f736c16ae9038b015fcdbd100716 Author: Hiroshi SHIBATA AuthorDate: 2023-12-13 14:42:37 +0900 Commit: git[bot] CommitDate: 2023-12-13 14:42:58 +0900 [ruby/io-nonblock] Bump up 0.3.0 https://github.com/ruby/io-nonblock/commit/501e2ffea3 commit 5cabe1e9cc6829d1918c65bf29c4ba8217cc466d Author: Hiroshi SHIBATA AuthorDate: 2023-12-13 14:05:21 +0900 Commit: git[bot] CommitDate: 2023-12-13 14:10:54 +0900 [ruby/io-wait] Bump up 0.3.1 https://github.com/ruby/io-wait/commit/5ec3db36c8 commit 12c775c94249b57dadfda0c2de9568398ae6cfd6 Author: Hiroshi SHIBATA AuthorDate: 2023-12-13 13:58:24 +0900 Commit: git[bot] CommitDate: 2023-12-13 14:01:16 +0900 [ruby/etc] Bump up 1.4.3 https://github.com/ruby/etc/commit/743c26086d commit ac939d9ca3164a748c656ea7f33c356d7b91b0f9 Author: David Rodríguez AuthorDate: 2023-12-11 21:19:45 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-13 13:02:22 +0900 [rubygems/rubygems] Improve default gem handling If a gem is specified in the Gemfile (or resolved as a transitive dependency), it's always resolved from remote/installed sources. Default gems are only used as a fallback for gems not included in the bundle. I believe this leads to more consistent behavior and more portable apps, since all gems will be installed to the configured bundle path, regardless of whether they are default gems or not. https://github.com/rubygems/rubygems/commit/091b4fcf2b commit 1a7aa5560f1a9967e320f71b7e8e8ee748151168 Author: David Rodríguez AuthorDate: 2023-12-11 21:05:42 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-13 13:02:22 +0900 [rubygems/rubygems] Refactor `bundle info` https://github.com/rubygems/rubygems/commit/0e919eaa87 commit 70428247c673987c6613396f55a8ab5651d27fe4 Author: David Rodríguez AuthorDate: 2023-12-11 20:41:58 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-13 13:02:21 +0900 [rubygems/rubygems] Remove dead code https://github.com/rubygems/rubygems/commit/fad186df39 commit 6b3c9cebe94cdd0d5f97877642689baed8a35327 Author: David Rodríguez AuthorDate: 2023-12-08 07:59:36 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-13 12:59:23 +0900 Normalize bundler bindir This makes bundler consistent with all other gems, and makes the default installation of Bundler in the release package look like any other bundler installation. Before (on preview3, for example), Bundler executable is installed at: lib/ruby/gems/3.3.0+0/gems/bundler-2.5.0.dev/libexec/bundle Now it's installed in the standard location: lib/ruby/gems/3.3.0+0/gems/bundler-2.5.0.dev/exe/bundle commit 866b6fcd69c85cd00118324942886d92a3bb2a0f Author: Hiroshi SHIBATA AuthorDate: 2023-12-13 11:51:59 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-13 12:16:55 +0900 RubyGems 3.5+ will use vendored net-http commit 5015481e537ab3dd34c184ed4ef20521c5b4f43d Author: Hiroshi SHIBATA AuthorDate: 2023-12-13 11:28:02 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-13 12:16:55 +0900 Removed duplicated LICENSE file commit befbcfd90c4fbbdc3cc3fa3a083ff6868a2bfb02 Author: Vít Ondruch AuthorDate: 2023-12-12 22:47:15 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-13 12:16:55 +0900 [rubygems/rubygems] Explain the 3 states `options[:user_install]` can have. This was issue previously, so hopefully this comment tries to state this explicitly for future readers. https://github.com/rubygems/rubygems/commit/8ccd830f85 commit 1fa5dd883e286a768a9dfa82ef3de562fcdabd01 Author: Vít Ondruch AuthorDate: 2023-12-12 22:37:30 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-13 12:16:55 +0900 [rubygems/rubygems] Test if the user dir is used for auto user installation This is mainly to align this test case with the `test_process_options_does_not_fallback_to_user_install_when_gem_home_ not_writable_and_no_user_install`, where the `install_dir` is checked already. https://github.com/rubygems/rubygems/commit/02b1884b61 commit 402fd96ddc401cf35bced8d394c44df98d6fc466 Author: Vít Ondruch AuthorDate: 2023-12-12 22:38:45 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-13 12:16:55 +0900 [rubygems/rubygems] Make sure `--no-user-install` is respected for auto user installation The `options[:user_install]` might have three states: * `true`: `--user-install` * `false`: `--no-user-install` and * `nil`: option was not specified However, this had not been respected previously and the `false` and `nil` were treated the same. This could lead to auto user installation despite `--no-user-install` being specified on the command line. Fixes https://github.com/rubygems/rubygems/pull/7237 https://github.com/rubygems/rubygems/commit/9281545474 commit 844759ccdbf9400796259888d613597585ad697a Author: David Rodríguez AuthorDate: 2023-12-13 01:13:47 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-13 12:16:55 +0900 [rubygems/rubygems] Add a spec to cover what vendoring timeout fixes https://github.com/rubygems/rubygems/commit/2662e45d75 commit 5323935f5799772cf5d18e4e5a2dcce914b4c6bd Author: David Rodríguez AuthorDate: 2023-12-13 01:13:30 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-13 12:16:55 +0900 [rubygems/rubygems] Remove no longer needed gem install during test https://github.com/rubygems/rubygems/commit/bdb78d8289 commit 20d99a2f5fde15a21f1232078389ea83cb71cb33 Author: David Rodríguez AuthorDate: 2023-07-05 01:49:04 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-13 12:16:55 +0900 [rubygems/rubygems] Resolv needs vendoring too https://github.com/rubygems/rubygems/commit/cdfc6923e4 commit f188a41afee554e46ea2125f22e7d989afc52be0 Author: David Rodríguez AuthorDate: 2023-07-05 01:34:01 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-13 12:16:55 +0900 [rubygems/rubygems] Use vendored timeout from RubyGems https://github.com/rubygems/rubygems/commit/cfc5018c54 commit a7c9163b5d87c0420e54cd75668bceb8f39a578a Author: David Rodríguez AuthorDate: 2023-07-01 04:22:32 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-13 12:16:55 +0900 [rubygems/rubygems] Vendor timeout in RubyGems too https://github.com/rubygems/rubygems/commit/e2e7440ede commit 90317472e87692fff1c864d129d60130dc3bab2c Author: David Rodríguez AuthorDate: 2023-01-30 05:28:29 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-13 12:16:55 +0900 [rubygems/rubygems] Use vendored net-http in Bundler https://github.com/rubygems/rubygems/commit/0d758e8926 commit ce924ce1fb029f19fd34a43f2012a485f4f62b53 Author: David Rodríguez AuthorDate: 2023-01-30 05:24:11 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-13 12:16:55 +0900 [rubygems/rubygems] Vendor net-http and net-protocol in RubyGems https://github.com/rubygems/rubygems/commit/99d91c9ed2 commit 6cefad77042ee3277488f56e8046c53f5313a82f Author: David Rodríguez AuthorDate: 2023-11-11 05:48:25 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-13 12:16:55 +0900 [rubygems/rubygems] Avoid loading artifice when not necessary https://github.com/rubygems/rubygems/commit/ef97ad37bd commit 7d5d2eef78d57bfac75b68c08e4bf5ce3d633a01 Author: David Rodríguez AuthorDate: 2023-11-11 03:39:48 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-13 12:16:55 +0900 [rubygems/rubygems] Load hax.rb before anything when `BUNDLER_IGNORE_DEFAULT_GEM` set https://github.com/rubygems/rubygems/commit/111bd11c36 commit 8d1a2036643faecf55b9c09d6b788d1cd3b1f064 Author: David Rodríguez AuthorDate: 2023-01-30 05:28:11 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-13 12:16:55 +0900 [rubygems/rubygems] Require `rubygems/request` where it's used https://github.com/rubygems/rubygems/commit/73b9498658 commit 196c24620e95e1c0412732cf14f1ccb441cf224f Author: Jemma Issroff AuthorDate: 2023-12-13 03:40:05 +0900 Commit: Jemma Issroff CommitDate: 2023-12-13 12:00:50 +0900 [PRISM] Correctly parse non-base 10 integers in Prism This commit passes an `end` to rb_int_parse_cstr which allows us to correctly parse non-base 10 integers which are enclosed in parenthesis. Prior to this commit, we were getting a putobject nil when compiling `(0o0)` for example. commit a2994c300b9620b0b226c8373f15627eead65d43 Author: KJ Tsanaktsidis AuthorDate: 2023-12-12 08:57:26 +0900 Commit: KJ Tsanaktsidis CommitDate: 2023-12-13 11:35:05 +0900 Add changelog entry for [Feature #20057] commit a8d2d93aff8d50adc914dfc24c09cfe28643501b Author: KJ Tsanaktsidis AuthorDate: 2023-12-11 13:22:42 +0900 Commit: KJ Tsanaktsidis CommitDate: 2023-12-13 11:35:05 +0900 Add a test case for preregistering with different data We want to make sure that if preregister is called with different data, that the postponed job table is updated. commit 15d14e2f396c10366902aefaca99ee73c10cd556 Author: KJ Tsanaktsidis AuthorDate: 2023-12-11 13:09:05 +0900 Commit: KJ Tsanaktsidis CommitDate: 2023-12-13 11:35:05 +0900 Simplify implementation of tracepoint tests With the latest version of the postponed job patchset merged, we don't actually need to go through the contortions of keeping the data in a global variable; we can just update `data` with multiple calls to rb_postponed_job_preregister. commit 4eefab592ac068acfd06fb9422f75a7786fbb855 Author: KJ Tsanaktsidis AuthorDate: 2023-12-11 13:00:43 +0900 Commit: KJ Tsanaktsidis CommitDate: 2023-12-13 11:35:05 +0900 Refactor local variable names in postponed_job methods Just removes the unneeded `prereg_` prefix from a few local var names. commit 626daa73ec244fa5a159dff31199bd336ec4ac8c Author: KJ Tsanaktsidis AuthorDate: 2023-12-11 12:52:47 +0900 Commit: KJ Tsanaktsidis CommitDate: 2023-12-13 11:35:05 +0900 Small doc improvements for rb_postponed_job API commit e96f6126f27c097d8148da143bb18edbe4180a61 Author: Ufuk Kayserilioglu AuthorDate: 2023-12-13 08:54:01 +0900 Commit: git[bot] CommitDate: 2023-12-13 09:21:42 +0900 [ruby/prism] Fix hash deopt based on contents The previous implementation of hash deopt was based on clearing the static literal flag on a hash node if the element that was being added was an array, hash or range node, or if the element was not a static literal in the first place. However, this is not correct. First of all, the elements added to a hash node will primarily be assoc nodes, but never array, hash or range nodes. Secondly, the static literal flag is set on assoc nodes, only if the value in an assoc node is a static literal, so the key is never checked. As a result, the static literal flag on a hash node would never be cleared if the key wasn't a static literal. This commit fixes this by clearing the static literal flag if: 1. the element is not an assoc node, 2. the element is an assoc node, but the key is not a static literal, or 3. the element is an assoc node, the key is a static literal, but assoc node (and thus the value in assoc node) is not a static literal. https://github.com/ruby/prism/commit/7f67109b36 commit 2350c7946275cd570cc1d7cd892abc16ac68a92c Author: Peter Zhu AuthorDate: 2023-12-12 03:23:26 +0900 Commit: Peter Zhu CommitDate: 2023-12-13 08:47:58 +0900 Use xfree for IO::Buffer Since IO::Buffer is allocated using TypedData_Make_Struct, it must use xfree to free the buffer otherwise it will cause more major GC to run. Example: ``` 10.times do 1_000_000.times { IO::Buffer.new(0) } puts "oldmalloc_increase_bytes: #{GC.stat(:oldmalloc_increase_bytes)}, major_gc_count: #{GC.stat(:major_gc_count)}" end ``` Before: ``` oldmalloc_increase_bytes: 14904176, major_gc_count: 3 oldmalloc_increase_bytes: 2399424, major_gc_count: 5 oldmalloc_increase_bytes: 5204640, major_gc_count: 6 oldmalloc_increase_bytes: 2199936, major_gc_count: 7 oldmalloc_increase_bytes: 34199936, major_gc_count: 7 oldmalloc_increase_bytes: 24223360, major_gc_count: 8 oldmalloc_increase_bytes: 5967616, major_gc_count: 9 oldmalloc_increase_bytes: 37967616, major_gc_count: 9 oldmalloc_increase_bytes: 9689792, major_gc_count: 10 oldmalloc_increase_bytes: 41689792, major_gc_count: 10 ``` After: ``` oldmalloc_increase_bytes: 117392, major_gc_count: 2 oldmalloc_increase_bytes: 26128, major_gc_count: 2 oldmalloc_increase_bytes: 71600, major_gc_count: 2 oldmalloc_increase_bytes: 117072, major_gc_count: 2 oldmalloc_increase_bytes: 17296, major_gc_count: 2 oldmalloc_increase_bytes: 62768, major_gc_count: 2 oldmalloc_increase_bytes: 108240, major_gc_count: 2 oldmalloc_increase_bytes: 153712, major_gc_count: 2 oldmalloc_increase_bytes: 53936, major_gc_count: 2 oldmalloc_increase_bytes: 99408, major_gc_count: 2 ``` commit 18a5b6b7e9c06cc3205ee0d2681a2adf6a52baaa Author: BurdetteLamar AuthorDate: 2023-12-13 06:05:19 +0900 Commit: Peter Zhu CommitDate: 2023-12-13 07:32:59 +0900 [DOC] RDoc for Complex commit 9f77eb1f5a1e52a32b249abaef990e50c31e2ecc Author: Alan Wu AuthorDate: 2023-12-13 07:24:17 +0900 Commit: Alan Wu CommitDate: 2023-12-13 07:24:17 +0900 Remove unused macros commit d4bbee7475269972cf56ebd3b5e4dc9905789663 Author: Alan Wu AuthorDate: 2023-12-13 07:10:14 +0900 Commit: GitHub CommitDate: 2023-12-13 07:10:14 +0900 YJIT: Fix off-by-one in Kernel#send type handling (#9212) Previously, if the method ID argument happens to be on one below the top of the stack, we didn't overwrite the type of the stack slot, which leaves an incorrect type for the stack slot. The included script tripped asserts both with and without --yjit-verify-ctx. commit 6e491cae5da769c38bfc88bc28aa1af8ec1705df Author: Takashi Kokubun AuthorDate: 2023-12-13 06:01:09 +0900 Commit: GitHub CommitDate: 2023-12-13 06:01:09 +0900 Move --repeat-count=2 job to macos-arm-oss (#9208) commit a6526342f3fbd94abc44cc4e99eda0943a61271f Author: eileencodes AuthorDate: 2023-12-13 03:44:33 +0900 Commit: Jemma Issroff CommitDate: 2023-12-13 05:15:02 +0900 [PRISM] Fix segv with regex once flag When you have an interpolated regex with a `once` flag and local variable is outside the block created by the `once` flag, Prism would see a segv. This is because it was not taking the depth into account. To fix this, we need to add 1 to the `local_depth_offset` on the `scope`. Fixes: ruby/prism#2047 commit 1572322e17caf2f0900f02099d21245b81554a28 Author: David Rodríguez AuthorDate: 2023-12-13 04:49:25 +0900 Commit: GitHub CommitDate: 2023-12-13 04:49:25 +0900 Sync with upstream rubygems (#9206) commit 0366c424e59b65fed953aa2148eaf14cb90bb6d3 Author: Takashi Kokubun AuthorDate: 2023-12-13 04:45:47 +0900 Commit: Takashi Kokubun CommitDate: 2023-12-13 04:45:48 +0900 Remove a duplicated job This was first added in b481b673d75, but 197e91f357 added -DUNIVERSAL_PARSER to the Compilers workflow as well. Given the nature of this test and the fact that it also runs make test-all besides make test, I think it's better to keep only the Compilers one. commit fd7decbf04f58438c04fa09fb325b16fbbec40c4 Author: Takashi Kokubun AuthorDate: 2023-12-13 04:19:00 +0900 Commit: Takashi Kokubun CommitDate: 2023-12-13 04:19:02 +0900 Allow syncing tool/bundler commit 43ede3f26cda8c2a4dfbce9a44b0b6aa06281cd7 Author: Matt Valentine-House AuthorDate: 2023-12-13 01:23:50 +0900 Commit: Jemma Issroff CommitDate: 2023-12-13 03:46:36 +0900 [PRISM] Compile NextNode arguments commit d1cf793adce7f797a3cd03594c539729c0099ec8 Author: Stan Lo AuthorDate: 2023-12-13 03:46:03 +0900 Commit: git[bot] CommitDate: 2023-12-13 03:46:07 +0900 [ruby/irb] Remove documents about deprecated/WIP features and some slight adjustments (https://github.com/ruby/irb/pull/811) https://github.com/ruby/irb/commit/6a9193e88b commit b9dfe04a73b9b4b9a3d3e96a3418a8d105e5c63a Author: Jemma Issroff AuthorDate: 2023-12-13 01:08:40 +0900 Commit: Jemma Issroff CommitDate: 2023-12-13 03:45:21 +0900 [PRISM] Implementing forwarding of args for ForwardingSuperNode ForwardingSuperNodes need to actually forward any applicable arguments. This commit implements that logic, by using the data stored on the local iseq about the parameters to forward the appropriate arguments. commit 68753e44083f7d4d171f66aa092b35ccb41a66f6 Author: Jemma Issroff AuthorDate: 2023-12-12 23:40:16 +0900 Commit: Jemma Issroff CommitDate: 2023-12-13 03:45:21 +0900 [PRISM] Allow rest parameter to be `*` Prior to this commit, if a rest parameters was `*`, we did not add it to the locals table correctly. This commit fixes that. commit f61df27b4ca73a31401ebe0357a3b7de947128e8 Author: Kevin Newton AuthorDate: 2023-12-13 03:43:54 +0900 Commit: git[bot] CommitDate: 2023-12-13 03:43:59 +0900 [ruby/prism] Use new flag setters for attribute write https://github.com/ruby/prism/commit/1e07832778 commit 06e2fbb8260022de8532d2e940fc69e8ea413679 Author: Kouhei Yanagita AuthorDate: 2023-11-22 18:12:23 +0900 Commit: Aaron Patterson CommitDate: 2023-12-13 02:36:37 +0900 [Bug #19114] Fix for multiple calls of TracePoint#enable commit 1f22245ed5004ef097e192aec157b34409214a2a Author: Ufuk Kayserilioglu AuthorDate: 2023-12-12 07:30:50 +0900 Commit: git[bot] CommitDate: 2023-12-13 02:35:53 +0900 [ruby/prism] Start using flag macros/methods exclusively https://github.com/ruby/prism/commit/5f05a6fe83 commit bdb38dd9f22accfddc8d0a5e211c74b6a06faf51 Author: Ufuk Kayserilioglu AuthorDate: 2023-12-12 07:28:03 +0900 Commit: git[bot] CommitDate: 2023-12-13 02:35:52 +0900 [ruby/prism] Add methods for setting/unsetting and macros for testing a flags https://github.com/ruby/prism/commit/e5f37d1407 commit 67940b135cae091f0f13d2c531b2ef33660e82fc Author: David Rodríguez AuthorDate: 2023-12-13 00:43:24 +0900 Commit: git[bot] CommitDate: 2023-12-13 02:16:19 +0900 [rubygems/rubygems] Bump rake version used by tests And make it easier to update next time. https://github.com/rubygems/rubygems/commit/1ea4bfa5d8 commit 278ce27ee4063dec5b8967563d58e32ea087a380 Author: Kevin Newton AuthorDate: 2023-12-13 00:39:41 +0900 Commit: git[bot] CommitDate: 2023-12-13 00:55:54 +0900 [ruby/prism] Flag for attribute write on calls https://github.com/ruby/prism/commit/465731969c commit 2f1d6da8c45590bf3461ed4bf051a4e1009eaf85 Author: Jeremy Evans AuthorDate: 2023-12-13 00:34:53 +0900 Commit: GitHub CommitDate: 2023-12-13 00:34:53 +0900 Fix op asgn calls with keywords Examples of such calls: ```ruby obj[kw: 1] += fo obj[**kw] &&= bar ``` Before this patch, literal keywords would segfault in the compiler, and keyword splat usage would result in TypeError. This handles all cases I can think of: * literal keywords * keyword splats * combined with positional arguments * combined with regular splats * both with and without blocks * both popped and non-popped cases This also makes sure that to_hash is only called once on the keyword splat argument, instead of twice, and make sure it is called before calling to_proc on a passed block. Fixes [Bug #20051] Co-authored-by: Nobuyoshi Nakada commit f671c5d1791d14a44902cfe672ae6b457d1592e9 Author: Martin Emde AuthorDate: 2023-12-12 09:40:07 +0900 Commit: git[bot] CommitDate: 2023-12-13 00:26:01 +0900 [rubygems/rubygems] Make RubyDsl a little easier to read; avoid a Hash sometimes https://github.com/rubygems/rubygems/commit/2dca83722b commit f466afa1768f437d5ee79444f35d65bc6e5374e8 Author: Nobuyoshi Nakada AuthorDate: 2023-11-09 22:29:44 +0900 Commit: Nobuyoshi Nakada CommitDate: 2023-12-12 23:57:27 +0900 [PRISM] Do not hide syntactically required parentheses within macros It makes code formatters confused when auto indenting. commit 185b7e92a37548255fcc8c5ab08b72abeadaf74e Author: Peter Zhu AuthorDate: 2023-12-09 05:18:07 +0900 Commit: Peter Zhu CommitDate: 2023-12-12 23:01:21 +0900 Make WeakKeyMap safe for compaction during allocation During allocation, the table may not have been allocated yet which would crash in the st_foreach. commit 33cf8f640bab35c463186ef0856689c22559fbeb Author: Peter Zhu AuthorDate: 2023-12-09 05:17:51 +0900 Commit: Peter Zhu CommitDate: 2023-12-12 23:01:21 +0900 Make WeakMap safe for compaction during allocation During allocation, the table may not have been allocated yet which would crash in the st_foreach. commit d313c82f797852037012138284d4e49fdaf284c4 Author: Ufuk Kayserilioglu AuthorDate: 2023-12-12 05:28:58 +0900 Commit: git[bot] CommitDate: 2023-12-12 22:05:09 +0900 [ruby/prism] Update tests and snapshots https://github.com/ruby/prism/commit/0663e2bcfa commit 43229d531ff77cd9f8414e75141fcf54fafb22c4 Author: Ufuk Kayserilioglu AuthorDate: 2023-12-12 05:26:51 +0900 Commit: git[bot] CommitDate: 2023-12-12 22:05:09 +0900 [ruby/prism] Start `KeywordHashNode`s with `STATIC_KEYS` set, until hit an element that should clear it https://github.com/ruby/prism/commit/7c7c486507 commit 25b9a0cbc86da562e765e4fac27bb28311646971 Author: Ufuk Kayserilioglu AuthorDate: 2023-12-12 05:26:06 +0900 Commit: git[bot] CommitDate: 2023-12-12 22:05:08 +0900 [ruby/prism] Add `STATIC_KEYS` flag for `KeywordHashNode` https://github.com/ruby/prism/commit/aa83de39c1 commit d1c25605f671c85b1088cb8021d815a89b629dbf Author: Martin Emde AuthorDate: 2023-12-12 08:31:15 +0900 Commit: git[bot] CommitDate: 2023-12-12 21:40:17 +0900 [rubygems/rubygems] Resolve `ruby file: ".ruby-version"` relative to Gemfile https://github.com/rubygems/rubygems/commit/0cbbaed8a5 commit 28a9a4275ce334ed50a582d8c781b40ce46a74ec Author: Stan Lo AuthorDate: 2023-12-12 20:27:20 +0900 Commit: git[bot] CommitDate: 2023-12-12 20:27:39 +0900 [ruby/irb] Remove trailing space This is required to fix ruby/ruby's CI https://github.com/ruby/irb/commit/3c77213209 commit 35990cb38c0c77ddcd0b1f914b4fea5c13e12f39 Author: Burdette Lamar AuthorDate: 2023-12-12 19:34:34 +0900 Commit: git[bot] CommitDate: 2023-12-12 19:34:38 +0900 [ruby/irb] [DOC] RDoc for module IRB (https://github.com/ruby/irb/pull/738) [DOC] RDoc for module IRB https://github.com/ruby/irb/commit/f3a0626298 commit 25711e7063060920d14e42a530da6f7198926629 Author: KJ Tsanaktsidis AuthorDate: 2023-12-09 10:30:39 +0900 Commit: KJ Tsanaktsidis CommitDate: 2023-12-12 18:05:21 +0900 Partially revert "Set AI_ADDRCONFIG when making getaddrinfo(3) calls" This _partially_ reverts commit d2ba8ea54a4089959afdeecdd963e3c4ff391748, but for UDP sockets only. With TCP sockets (and other things which use `rsock_init_inetsock`), the order of operations is to call `getaddrinfo(3)` with AF_UNSPEC, look at the returned addresses, pick one, and then call `socket(2)` with the family for that address (i.e. AF_INET or AF_INET6). With UDP sockets, however, this is reversed; `UDPSocket.new` takes an address family as an argument, and then calls `socket(2)` with that family. A subsequent call to UDPSocket#connect will then call `getaddrinfo(3)` with that family. The problem here is that... * If you are in a networking situation that _only_ has loopback addrs, * And you want to look up a name like "localhost" (or NULL) * And you pass AF_INET or AF_INET6 as the ai_family argument to getaddrinfo(3), * And you pass AI_ADDRCONFIG to the hints argument as well, then glibc on Linux will not return an address. This is because AI_ADDRCONFIG is supposed to return addresses for families we actually have an address for and could conceivably connect to, but also is documented to explicitly ignore localhost in that situation. It honestly doesn't make a ton of sense to pass AI_ADDRCONFIG if you're explicitly passing the address family anyway, because you're not looking for "an address for this name we can connect to"; you're looking for "an IPv(4|6) address for this name". And the original glibc bug that d2ba8ea5 was supposed to work around was related to parallel issuance of A and AAAA queries, which of course won't happen if an address family is explicitly specified. So, we fix this by not passing AI_ADDRCONFIG for calls to `rsock_addrinfo` that we also pass an explicit family to (i.e. for UDPsocket). [Bug #20048] commit f64485af7eb8a1bbaabbf59434592b6e6a0299d0 Author: git[bot] AuthorDate: 2023-12-12 15:58:23 +0900 Commit: git[bot] CommitDate: 2023-12-12 15:58:23 +0900 Update bundled gems list as of 2023-12-12 commit e411bd5b3684bfa5c654290059e9207a9596aad7 Author: Nobuyoshi Nakada AuthorDate: 2023-12-12 14:41:09 +0900 Commit: git[bot] CommitDate: 2023-12-12 15:40:44 +0900 [ruby/securerandom] [DOC] Satisfy RDoc coverage https://github.com/ruby/securerandom/commit/ddf2672e47 commit dbd704ae6f0e0fdcefa2007ce1c06f7021c8e830 Author: Nobuyoshi Nakada AuthorDate: 2023-12-12 14:11:51 +0900 Commit: git[bot] CommitDate: 2023-12-12 15:40:43 +0900 [ruby/securerandom] [DOC] Add documents of methods and constants https://github.com/ruby/securerandom/commit/9a99978135 commit cb93d10ae559b0cf0f0935ddc1cc50dda65c6df8 Author: Yusuke Endoh AuthorDate: 2023-12-12 15:35:59 +0900 Commit: git[bot] CommitDate: 2023-12-12 15:36:10 +0900 [ruby/securerandom] [DOC] Improve the document about reproducibility of uuid_v7 https://github.com/ruby/securerandom/pull/19/files#r1329476195 https://github.com/ruby/securerandom/commit/156cbb8448 commit f49af3c969eb7ba9937514a229b49e5b7d91f0f1 Author: Jeremy Evans AuthorDate: 2023-12-12 10:34:52 +0900 Commit: Jeremy Evans CommitDate: 2023-12-12 15:31:16 +0900 Make Dir#chdir never yield args, and return block return value If no block is given, return 0 instead of nil for consistency with Dir.chdir and Dir.fchdir. commit 9f0065a077f00a077f507461846234c52509ce90 Author: Takashi Kokubun AuthorDate: 2023-12-12 14:12:08 +0900 Commit: GitHub CommitDate: 2023-12-12 14:12:08 +0900 Initialize interrupt queue before signal handlers (#9196) commit 1e5c8afb151c0121e83657fb6061d0e3805d30f6 Author: Martin Emde AuthorDate: 2023-12-12 10:16:37 +0900 Commit: git[bot] CommitDate: 2023-12-12 11:39:57 +0900 [rubygems/rubygems] Ensure that the lockfile mtime is not altered on frozen install https://github.com/rubygems/rubygems/commit/6847709ee0 commit 6b3abcf4622c6ae39ddfd5b21c2387f177f82e0d Author: NARUSE, Yui AuthorDate: 2023-12-11 16:01:04 +0900 Commit: NARUSE, Yui CommitDate: 2023-12-12 11:22:40 +0900 fix regexp pattern of diff commit e223dde3295cc59415c289305fd8d706d46cd2e9 Author: Samuel Giddins AuthorDate: 2023-08-31 07:21:20 +0900 Commit: git[bot] CommitDate: 2023-12-12 11:10:53 +0900 [rubygems/rubygems] Allow bundle pristine to run in parallel Also fix running when BUNDLE_NO_INSTALL happens to be set, same as with install/update commands https://github.com/rubygems/rubygems/commit/a555fd6ccd commit 305f66b859c0fd123c95db74700d8b2c13fe2fe2 Author: Nobuyoshi Nakada AuthorDate: 2023-12-12 11:06:27 +0900 Commit: Nobuyoshi Nakada CommitDate: 2023-12-12 11:06:27 +0900 Save $VERBOSE properly commit 73b43fffa163e11ce9e7e8880631acb870ac1695 Author: Yusuke Endoh AuthorDate: 2023-12-12 10:31:14 +0900 Commit: Yusuke Endoh CommitDate: 2023-12-12 10:31:37 +0900 Prevent a warning: assigned but unused variable - status commit 207dcf07e1e1359ca87590c8c22867024f20ae03 Author: Yusuke Endoh AuthorDate: 2023-12-12 10:30:12 +0900 Commit: Yusuke Endoh CommitDate: 2023-12-12 10:31:37 +0900 Prevent a warning: method redefined commit cfb8494d5473b3695ac40aa6a9891284603bfc89 Author: Yusuke Endoh AuthorDate: 2023-12-12 10:29:26 +0900 Commit: Yusuke Endoh CommitDate: 2023-12-12 10:31:37 +0900 Prevent warning: possibly useless use of a literal in void context commit 0c287df3bc4c1a7aed3279e20590ecf628722b4d Author: Yusuke Endoh AuthorDate: 2023-12-12 10:28:19 +0900 Commit: Yusuke Endoh CommitDate: 2023-12-12 10:31:37 +0900 Prevent a warning: setting Encoding.default_external commit 535eb4de1109f5b8a8bde063dacc4c6fabf2322c Author: Yusuke Endoh AuthorDate: 2023-12-12 10:26:06 +0900 Commit: Yusuke Endoh CommitDate: 2023-12-12 10:31:37 +0900 Remove unused statement ... to disable a warning: assigned but unused variable - expected commit 6414f260fc64878dc32f6899f5cecfac9908d26d Author: Franz Liedke AuthorDate: 2023-12-04 17:15:58 +0900 Commit: git[bot] CommitDate: 2023-12-12 10:08:20 +0900 [rubygems/rubygems] Refactor: Wrap filesystem access https://github.com/rubygems/rubygems/commit/119d4bdc09 commit 0653fb026cd2203158b7af1e8b9608911dce2860 Author: Franz Liedke AuthorDate: 2023-12-03 04:03:39 +0900 Commit: git[bot] CommitDate: 2023-12-12 10:08:20 +0900 [rubygems/rubygems] Refactor: Move filesystem access into Definition class https://github.com/rubygems/rubygems/commit/2720da2659 commit 0ec88b54f34ee0b0197f963ad6a98a2390a91de7 Author: Franz Liedke AuthorDate: 2023-12-03 03:54:44 +0900 Commit: git[bot] CommitDate: 2023-12-12 10:08:19 +0900 [rubygems/rubygems] bundle lock: Always touch the lockfile https://github.com/rubygems/rubygems/commit/fd2e71dfdb commit 8c2480c9edf7d20505a8c3491ec84a3fdd77bd2e Author: David Rodríguez AuthorDate: 2023-12-12 05:30:12 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-12 10:04:57 +0900 Unlock tilt since we no longer support Ruby 2.6 commit a848c070d28fd8c836e3bf06c4b73cf7d293a290 Author: David Rodríguez AuthorDate: 2023-12-12 05:31:37 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-12 10:04:57 +0900 [rubygems/rubygems] Remove doc not adding much value https://github.com/rubygems/rubygems/commit/c241a88962 commit 0e05392dccaaf4f9a0ce66228fd64dbd96b62227 Author: Martin Emde AuthorDate: 2023-12-09 04:25:23 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-12 10:04:57 +0900 [rubygems/rubygems] Make tests compatible with paths that contain a + char https://github.com/rubygems/rubygems/commit/3355c80c90 commit 3b9ea6648fcc110769c27686ebdc51fbbf1798c8 Author: Martin Emde AuthorDate: 2023-12-09 02:44:10 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-12 10:04:57 +0900 [rubygems/rubygems] Use StringIO 3.1.0 in tests to work with ruby 3.3.0 https://github.com/rubygems/rubygems/commit/8a936d733d commit 0b24c71a5a30a7d38976f6d0c20e71d9399adb02 Author: David Rodríguez AuthorDate: 2023-12-08 07:25:44 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-12 10:04:57 +0900 [rubygems/rubygems] Improve enabling bundled gems warnings https://github.com/rubygems/rubygems/commit/7be5b40ca9 commit a06bf001b29bba77e71ba270f73469d9c9b4b0f0 Author: David Rodríguez AuthorDate: 2023-12-07 22:51:22 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-12 10:04:57 +0900 [rubygems/rubygems] Remove non-transparent requirement added to prerelease gems I think we can safely assume these days that all RubyGems and Bundler versions that will ever bundle a new gem created in 2023 support prereleases. So this non transparent requirement is not necessary. In my opinion, it should be the gem author to explicitly add this constraint, not RubyGems. https://github.com/rubygems/rubygems/commit/b165e6d725 commit b37288c047681e02615b5b484fb265b394ddc612 Author: Vít Ondruch AuthorDate: 2023-12-08 22:03:07 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-12 10:04:56 +0900 [rubygems/rubygems] Make the "auto-user-install" logic easier to follow https://github.com/rubygems/rubygems/commit/4b4d9c0106 commit c032dfb5cbd844a8474a1397e65b4e04203d0ddd Author: David Rodríguez AuthorDate: 2023-12-12 01:28:10 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-12 10:04:56 +0900 [rubygems/rubygems] Fix installing from source when same bundler version already a default gem https://github.com/rubygems/rubygems/commit/620119308e commit 23289ad45bcf67e218352503958e2d788fbb6c2c Author: David Rodríguez AuthorDate: 2023-12-12 01:22:54 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-12 10:04:56 +0900 [rubygems/rubygems] Extract some common strings to variables https://github.com/rubygems/rubygems/commit/48bc573310 commit a811ebf3d5113971b6dc62a8c56053bca1a1d49b Author: David Rodríguez AuthorDate: 2023-12-08 06:49:14 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-12 10:04:56 +0900 [rubygems/rubygems] Revert missing extensions patch https://github.com/rubygems/rubygems/commit/4016c6c024 commit 38348502b5429703e418cf4634e405ce77fd4bbc Author: Nobuyoshi Nakada AuthorDate: 2023-12-12 09:39:13 +0900 Commit: Nobuyoshi Nakada CommitDate: 2023-12-12 09:39:13 +0900 [DOC] Update description about shared library suffix Loading an extension library with ".dll" suffix on Windows was very old behavior, and the suffix must be ".so" since 2004. See commits removing DLEXT2 181a3a2af5df88d145b73a060d51fe437c8c4ad4 and b76ad15ed0da636161de0243c547ee1e6fc95681. Instead, use macOS as an example, which uses ".bundle". commit 4eca329d29a98209df401aa97d55b9fb8684ba1b Author: Alan Wu AuthorDate: 2023-12-12 08:55:24 +0900 Commit: Alan Wu CommitDate: 2023-12-12 09:21:08 +0900 Skip a YJIT test on RJIT commit 9cb0ad863c0781062388fe1bb2a5d279dc29e734 Author: Alan Wu AuthorDate: 2023-12-12 07:41:27 +0900 Commit: Alan Wu CommitDate: 2023-12-12 09:21:08 +0900 YJIT: Fix missing arity check for splat calls to methods with optionals Previously, for splat callsites that land in methods with optional parameters, we didn't reject the case where the caller supplies too many arguments. Accepting those calls previously caused YJIT to construct corrupted control frames, which leads to crashes if the callee uses certain stack walking methods such as Kernel#raise and String#gsub (for setting up the frame-local `$~`). Example crash in a debug build: Assertion Failed: ../vm_core.h:1375:VM_ENV_FLAGS:FIXNUM_P(flags) commit 47553094740ee17f2490fcb29893cac653c0b5dd Author: Alan Wu AuthorDate: 2023-12-12 07:37:39 +0900 Commit: Alan Wu CommitDate: 2023-12-12 09:21:08 +0900 YJIT: Rename helper function and correct counter name Counter::guard_send_iseq_has_rest_and_splat_not_equal was using jump-if-lesser-than, so wasn't checking for equality. Rename function because moving is destructive in Rust, which is confusing for this function which doesn't modify the array. commit 9765ada69c34eb1c21855d145c2c6d752b8839b0 Author: Kazuhiro NISHIYAMA AuthorDate: 2023-12-12 08:47:18 +0900 Commit: Kazuhiro NISHIYAMA CommitDate: 2023-12-12 09:14:11 +0900 Fix NoMethodError on fail ``` .../tool/lib/colorize.rb:56:in `resolve_color': undefined method `gsub' for an instance of Symbol (NoMethodError) color.gsub(/\b[a-z][\w ]+/) do |n| ^^^^^ from .../tool/lib/colorize.rb:47:in `decorate' from .../tool/lib/test/unit.rb:1012:in `block in failed' ``` commit 505715ddf17e004d184c0b71afb40a31e2e8c98e Author: Samuel Giddins AuthorDate: 2023-09-19 10:51:15 +0900 Commit: git[bot] CommitDate: 2023-12-12 08:14:58 +0900 [rubygems/rubygems] Fewer allocations in gem installation For now, on a small rails app I have hanging around: ``` ==> memprof.after.txt <== Total allocated: 872.51 MB (465330 objects) Total retained: 40.48 kB (326 objects) ==> memprof.before.txt <== Total allocated: 890.79 MB (1494026 objects) Total retained: 40.40 kB (328 objects) ``` Not a huge difference in memory usage, but it's a drastic improvement in total number of allocations. Additionally, this will pay huge dividends once https://github.com/ruby/zlib/pull/61 is merged, as it will allow us to completely avoid allocations in the repeated calls to readpartial, which currently accounts for most of the memory usage shown above. https://github.com/rubygems/rubygems/commit/f78d45d927 commit 4a94ce8569c9399bd286d943ff35f6f3a25ed1b6 Author: hogelog AuthorDate: 2023-12-12 07:13:54 +0900 Commit: GitHub CommitDate: 2023-12-12 07:13:54 +0900 [DOC] Fix RDoc to match actual Kenrel.require behavior (#9180) commit 69d60cc67ba0d7cf9318ccafa9d4c625103e955d Author: Jemma Issroff AuthorDate: 2023-12-12 05:17:48 +0900 Commit: Jemma Issroff CommitDate: 2023-12-12 07:04:46 +0900 [PRISM] Properly compile MultiTargetNodes within parameters If there are MultiTargetNodes within parameters, we need to iterate over them and compile them individually correctly, once the locals are all in the correct spaces. We need to add one getlocal for the hidden variable, and then can recurse into the MultiTargetNodes themselves commit 5c8e1911ca19bc3d346db5ae6314cc8957e9339a Author: Jemma Issroff AuthorDate: 2023-12-12 04:46:24 +0900 Commit: Jemma Issroff CommitDate: 2023-12-12 07:04:46 +0900 [PRISM] Fixed rest in MultiTargetNodes commit aaeccc2924d34e2c012df0cd482ca66a9d7297c4 Author: Jemma Issroff AuthorDate: 2023-12-12 04:17:02 +0900 Commit: Jemma Issroff CommitDate: 2023-12-12 07:04:46 +0900 [PRISM] Correctly implemented forwarding parameters in methods commit 85ad5be9ee7597f6a550d66c90dc4fdd5a15f923 Author: Jemma Issroff AuthorDate: 2023-12-07 00:05:14 +0900 Commit: Jemma Issroff CommitDate: 2023-12-12 07:04:46 +0900 [PRISM] Restructure parameters on ScopeNodes This commit completely restructures how we handle parameters. The motivation for this commit was the fix compilation of MultiTargetNodes within parameters, including nested MultiTargetNodes. A subsequent commit will actually do the compilation for the MultiTargetNodes. This commit's main accomplishment is restructuring the locals table and how we account for it on the ScopeNode, specifically with regards to hidden variables. It has multiple steps, all commented within the code, to calculate the locals table correctly and compile the parameters: - Step 1: Caculate the table size for the locals - Step 2: Populate iv index table and local table - Step 3: Fill in parameter names of MultiTargetNodes on local table - Step 4: Fill in method body locals on local table - Step 5: Compile any locals commit e1d995a96cf99387ce1798904c3051ba11e43d18 Author: Burdette Lamar AuthorDate: 2023-12-12 05:38:16 +0900 Commit: GitHub CommitDate: 2023-12-12 05:38:16 +0900 [DOC] Complex doc (#9185) commit 687d29f93ce45bd6721fc06530015a147e4057f0 Author: Koichi Sasada AuthorDate: 2023-12-11 07:40:22 +0900 Commit: Koichi Sasada CommitDate: 2023-12-12 02:59:10 +0900 try modified tests. debug.gem 1.9.0 has a test issue so try modified one. ref: https://github.com/ruby/debug/commit/d4feeae32b69b4f88c94fecfc7a283b475eec4de commit fb935350707ce14b2f678612dae4cae079fd163c Author: Jemma Issroff AuthorDate: 2023-12-12 02:14:21 +0900 Commit: Jemma Issroff CommitDate: 2023-12-12 02:53:47 +0900 [PRISM] Define and use a pm_add_ensure_iseq Prior to this commit, we were using `add_ensure_iseq` which compiled a node as if it was a CRuby node. This commit defines `pm_add_ensure_iseq` which compiles the Prism node appropriately. commit 3f25c08fa598ba48da8bb504aabe93a4a4c2d486 Author: Maxime Chevalier-Boisvert AuthorDate: 2023-12-12 02:52:47 +0900 Commit: GitHub CommitDate: 2023-12-12 02:52:47 +0900 YJIT: implement call fuzzer script (#9129) * YJIT: implement call fuzzer script Attempt to detect bugs in YJIT call implementation. * Add basic checks for rest, kwrest. Impprove formatting. * Refactor call fuzzer to make it more powerful and maintainable Compute checksum of arguments * Fix checksum computation. Add useless locals as sussged by Alan. * Add some useless if statements * Add arguments of different types * Pass object arguments as well. Force different shapes. * Compute fuzzing time/speed * Make use of block param commit 4095e7d2be0ef6426e0cb75a53472f6dc1e5a0af Author: Kevin Newton AuthorDate: 2023-12-11 23:30:24 +0900 Commit: git[bot] CommitDate: 2023-12-12 01:34:55 +0900 [ruby/prism] Regexp terminator escapes https://github.com/ruby/prism/commit/42a48a2ba9 commit c65de63913487caf26a281cb5c3be112f87a23a1 Author: Kevin Newton AuthorDate: 2023-12-11 23:12:54 +0900 Commit: git[bot] CommitDate: 2023-12-12 01:34:41 +0900 [ruby/prism] Handle a non-interpolated dsym spanning a heredoc https://github.com/ruby/prism/commit/b23136ebfd commit 261e8f28a0ccc6119fe38189a55388520969d8ff Author: Kevin Newton AuthorDate: 2023-12-11 22:50:59 +0900 Commit: git[bot] CommitDate: 2023-12-12 01:34:27 +0900 [ruby/prism] Correct escapes when ctrl+meta+escape https://github.com/ruby/prism/commit/ee68b17c01 commit e186cebe420367947b89a5221491429452d724d5 Author: Martin Emde AuthorDate: 2023-12-09 05:13:49 +0900 Commit: git[bot] CommitDate: 2023-12-12 00:40:08 +0900 [rubygems/rubygems] Override initialize in bundle rubygems_ext for NameTuple https://github.com/rubygems/rubygems/commit/f63ce682d2 commit b673b5b4329d020b19907142f291c8ecd69e95e0 Author: Kevin Newton AuthorDate: 2023-12-08 23:57:31 +0900 Commit: git[bot] CommitDate: 2023-12-12 00:32:31 +0900 [ruby/prism] Split up CallNode in target position In this commit we're splitting up the call nodes that were in target positions (that is, for loop indices, rescue error captures, and multi assign targets). Previously, we would simply leave the call nodes in place. This had the benefit of keeping the AST relatively simple, but had the downside of not being very explicit. If a static analysis tool wanted to only look at call nodes, it could easily be confused because the method would have 1 fewer argument than it would actually be called with. This also brings some consistency to the AST. All of the nodes in a target position are now *TargetNode nodes. These should all be treated the same, and the call nodes can now be treated the same. Finally, there is benefit to memory. Because being in a target position ensures we don't have some fields, we can strip down the number of fields on these nodes. So this commit introduces two new nodes: CallTargetNode and IndexTargetNode. For CallTargetNode we get to drop the opening_loc, closing_loc, arguments, and block. Those can never be present. We also get to mark their fields as non-null, so they will always be seen as present. The IndexTargetNode keeps around most of its fields but gets to drop both the name (because it will always be []=) and the message_loc (which was always super confusing because it included the arguments by virtue of being inside the []). Overall, this adds complexity to the AST at the expense of memory savings and explicitness. I believe this tradeoff is worth it in this case, especially because these are very much not common nodes in the first place. https://github.com/ruby/prism/commit/3ef71cdb45 commit c69d1367a7994c70f956fc6486568823e8fa5812 Author: Jemma Issroff AuthorDate: 2023-12-09 06:17:07 +0900 Commit: Jemma Issroff CommitDate: 2023-12-11 23:47:59 +0900 [PRISM] Fix ElseNode within CaseNode The logic within the consequent for the CaseNodes in popped cases was incorrect as it wouldn't emit consequent instructions for a popped CaseNode. This commit fixes that. commit 0562c246ebdf071dfb85b2f7904574d38fee14f7 Author: Ufuk Kayserilioglu AuthorDate: 2023-12-07 08:36:00 +0900 Commit: Jemma Issroff CommitDate: 2023-12-11 23:47:33 +0900 Add handling of implicit hash arguments Arguments that are passed as a hash need special consideration since in certain case they are not treated as keyword arguments. For example, if a call is passing `"a" => 1` as an argument, this will be turned into an implicit hash argument and not a keyword argument. The existing compiler checks to see if all hash nodes can be treated as keyword arguments. If they can, then it will treat them as keyword arguments. If not, then it will treat them as implicit hash arguments. This commit implements the same logic inside the Prism compiler. commit 48cb70fee95dcdcf5f9eef2ef40c3adfecc214fa Author: TSUYUSATO Kitsune AuthorDate: 2023-12-11 12:44:33 +0900 Commit: git[bot] CommitDate: 2023-12-11 22:36:37 +0900 [ruby/prism] Fix parsing unterminated empty string `"` Fix https://github.com/ruby/prism/pull/2034 https://github.com/ruby/prism/commit/8280e577fa commit a860e3605c53e708d3cb06e2080ff73b58de4b22 Author: TSUYUSATO Kitsune AuthorDate: 2023-12-11 14:10:57 +0900 Commit: git[bot] CommitDate: 2023-12-11 22:34:48 +0900 [ruby/prism] Fix to parse a (endless-)range with binary operators Fix https://github.com/ruby/prism/pull/2022 Fix https://github.com/ruby/prism/pull/2030 https://github.com/ruby/prism/commit/b78d8b6525 commit 1ab91b12fa5f7e98bba2e59e2f40b57004d9acf1 Author: Daisuke Aritomo AuthorDate: 2023-12-09 13:13:53 +0900 Commit: git[bot] CommitDate: 2023-12-11 20:07:36 +0900 [rubygems/rubygems] Stream output from ext builds when --verbose Uses Open3.popen2e in place of Open3.capture2e in Gem::Ext::Builder. This change aims to stream stdout/stderr of ext builds when in verbose mode, instead of printing everything at once when the build completes. Nice for debugging gem builds that consumes longer times. https://github.com/rubygems/rubygems/commit/dcdcb5adda commit 655aacc43a2ae263c9b71429232853d16df028d5 Author: Nobuyoshi Nakada AuthorDate: 2023-12-11 15:48:51 +0900 Commit: Nobuyoshi Nakada CommitDate: 2023-12-11 16:51:46 +0900 Use dedicated functions to check terminators commit 980255cb7bfc9ea1ed105ff641ec44b751deced6 Author: git[bot] AuthorDate: 2023-12-11 15:58:43 +0900 Commit: git[bot] CommitDate: 2023-12-11 15:58:43 +0900 Update bundled gems list as of 2023-12-10 commit e5e53ee173170d2ed354be45f20852359452b45a Author: Hsing-Hui Hsu AuthorDate: 2023-12-11 04:08:25 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-11 08:56:37 +0900 docs(compar.c): change class name in example commit 91b0d5fa38f8f48a62ac9d10b50f0d65856fc897 Author: Burdette Lamar AuthorDate: 2023-12-11 00:22:22 +0900 Commit: GitHub CommitDate: 2023-12-11 00:22:22 +0900 [DOC] RDoc for Complex (#9181) commit c4c39082af3520cd96aefc2219a7037865f3f710 Author: Koichi Sasada AuthorDate: 2023-12-10 01:47:14 +0900 Commit: Koichi Sasada CommitDate: 2023-12-10 15:39:06 +0900 add `flags` to `rb_postponed_job_preregister` for future extensions. commit f8effa209adb3ce050c100ffaffe6f3cc1508185 Author: KJ Tsanaktsidis AuthorDate: 2023-11-19 20:54:57 +0900 Commit: Koichi Sasada CommitDate: 2023-12-10 15:00:37 +0900 Change the semantics of rb_postponed_job_register Our current implementation of rb_postponed_job_register suffers from some safety issues that can lead to interpreter crashes (see bug #1991). Essentially, the issue is that jobs can be called with the wrong arguments. We made two attempts to fix this whilst keeping the promised semantics, but: * The first one involved masking/unmasking when flushing jobs, which was believed to be too expensive * The second one involved a lock-free, multi-producer, single-consumer ringbuffer, which was too complex The critical insight behind this third solution is that essentially the only user of these APIs are a) internal, or b) profiling gems. For a), none of the usages actually require variable data; they will work just fine with the preregistration interface. For b), generally profiling gems only call a single callback with a single piece of data (which is actually usually just zero) for the life of the program. The ringbuffer is complex because it needs to support multi-word inserts of job & data (which can't be atomic); but nobody actually even needs that functionality, really. So, this comit: * Introduces a pre-registration API for jobs, with a GVL-requiring rb_postponed_job_prereigster, which returns a handle which can be used with an async-signal-safe rb_postponed_job_trigger. * Deprecates rb_postponed_job_register (and re-implements it on top of the preregister function for compatability) * Moves all the internal usages of postponed job register pre-registration commit aecbd66742f43ccfcac04ca4143fcc68ad834320 Author: KJ Tsanaktsidis AuthorDate: 2023-11-19 20:54:01 +0900 Commit: Koichi Sasada CommitDate: 2023-12-10 15:00:37 +0900 Add RUBY_ATOMIC_{PTR_,}FETCH macros for atomic loads This can already be emulated by doing an atomic fetch_add of zero, but this is more explicit. [Bug #19994] commit 130268e264f59c037eda31205c6e2223cffafbbe Author: Stan Lo AuthorDate: 2023-12-10 13:21:41 +0900 Commit: git[bot] CommitDate: 2023-12-10 13:21:46 +0900 [ruby/irb] Simplify show_source's super calculation (https://github.com/ruby/irb/pull/807) https://github.com/ruby/irb/commit/2cccc448de commit 04eb1b6f2630a07b3a4140e593a4973493a71b92 Author: Alex Koval AuthorDate: 2023-12-09 21:58:39 +0900 Commit: git[bot] CommitDate: 2023-12-10 12:06:36 +0900 [ruby/prism] fix: escape newline https://github.com/ruby/prism/commit/a28b427dcc commit f64357540eabad0f1bfaa6be60710d153325b064 Author: Jeremy Evans AuthorDate: 2023-12-08 05:16:09 +0900 Commit: Jeremy Evans CommitDate: 2023-12-10 06:15:47 +0900 Ensure super(**kw, &block) calls kw.to_hash before block.to_proc Similar as previous commit, but handles the super case with explicit arguments. commit a950f230788d51e13d16596e37cb77e4cc6e2311 Author: Jeremy Evans AuthorDate: 2023-11-09 08:56:53 +0900 Commit: Jeremy Evans CommitDate: 2023-12-10 06:15:47 +0900 Ensure f(**kw, &block) calls kw.to_hash before block.to_proc Previously, block.to_proc was called first, by vm_caller_setup_arg_block. kw.to_hash was called later inside CALLER_SETUP_ARG or setup_parameters_complex. This adds a splatkw instruction that is inserted before sends with ARGS_BLOCKARG and KW_SPLAT and without KW_SPLAT_MUT. This is not needed in the KW_SPLAT_MUT case, because then you know the value is a hash, and you don't need to call to_hash on it. The splatkw instruction checks whether the second to top block is a hash, and if not, replaces it with the value of calling to_hash on it (using rb_to_hash_type). As it is always before a send with ARGS_BLOCKARG and KW_SPLAT, second to top is the keyword splat, and top is the passed block. commit c0b6ea7c8b5dc6e48ecf6e14e1dbd135d079f0fc Author: KJ Tsanaktsidis AuthorDate: 2023-12-09 08:55:12 +0900 Commit: Jeremy Evans CommitDate: 2023-12-10 05:49:51 +0900 Add a fudge factor to the GC compaction move up/down tests There seems to be another manifestation of bug #20021, where some of the compaction tests are failing on i686 for unrelated PR's because of fake "live" references to moved objects on the machine stack. We _could_ solve this by counting how many objects are pinned during compaction, but doing that involves pushing down the mark & pin bitset merge into gc_compact_plane and out of gc_compact_page, which I thought was pretty ugly. Now that we've solved bug #20022 though, we're able to compact arbitrarily many objects with GC.verify_compaction_references, so the number of objects we're moving is now 50,000 instead of 500. Since that's now much larger than the number of objects likely to be pinned, I think it's safe enough to just add a fudge-factor to the tests. Any _other_ change in GC.verify_compaction_references that breaks compaction is now highly likely to break the assertion by more than 10 objects, since it's operating on so many more in the first place. [Bug #20021] commit 9e09e5aa3af03a42cf6ef59da2779b0a5d5a6505 Author: John Hawthorn AuthorDate: 2023-12-10 04:33:36 +0900 Commit: John Hawthorn CommitDate: 2023-12-10 05:01:29 +0900 Fix test of GVL instrumentation on Ractor sleeping It seems that the Ractor sleep GVL event arrives very slightly after the value becomes available and other threads wake (which makes sense) so we need a little additional time to ensure we end up in a consisteny state. commit b2ad4fec1a369e1cbd0c65d52062946a4fbfb84b Author: John Hawthorn AuthorDate: 2023-12-09 14:16:02 +0900 Commit: John Hawthorn CommitDate: 2023-12-10 02:31:41 +0900 Add missing GVL hooks for M:N threads and ractors commit edb8fc24d4a51e58f283a6e7fd1b18b43739fa05 Author: Yusuke Endoh AuthorDate: 2023-12-09 17:31:39 +0900 Commit: git[bot] CommitDate: 2023-12-09 17:34:08 +0900 [ruby/error_highlight] Bump version https://github.com/ruby/error_highlight/commit/942a723d32 commit 07734b51c66756c4a7a512ebb4736763542d99f3 Author: Victor Shepelev AuthorDate: 2023-12-09 13:54:33 +0900 Commit: GitHub CommitDate: 2023-12-09 13:54:33 +0900 [DOC] Small fixes for documentation rendering Mostly just fixing RDoc's incorrect treatment of `+` commit 1cbe114d1cf57dc47b4bbc6780f424647dd906d9 Author: eileencodes AuthorDate: 2023-12-09 05:00:48 +0900 Commit: Aaron Patterson CommitDate: 2023-12-09 05:45:40 +0900 [PRISM] Fix `PM_CALL_NODE` assignment This PR fixes ruby/prism#1963. Array and variable assignment was broken for call nodes. The change checks if the `method_id` is related to assignment and if is adds a `putnil`, `setn` and a `pop`. The incorrect instructions meant that in some cases (demonstrated in tests) the wrong value would be returned. I verified that this fixes the test mentioned in the issue (run: `RUBY_ISEQ_DUMP_DEBUG=prism make test/-ext-/st/test_numhash.rb`) Incorrect instructions: ``` "********* Ruby *************" == disasm: #@:1 (1,0)-(4,10)> 0000 putnil ( 4)[Li] 0001 putself 0002 send , nil 0005 putself 0006 send , nil 0009 putself 0010 send , nil 0013 setn 3 0015 send , nil 0018 pop 0019 leave "********* PRISM *************" == disasm: #@:3 (3,0)-(3,10)> 0000 putself ( 3)[Li] 0001 send , nil 0004 putself 0005 send , nil 0008 putself 0009 send , nil 0012 send , nil 0015 leave ``` Fixed instructions: ``` "********* Ruby *************" == disasm: #@:1 (1,0)-(4,10)> 0000 putnil ( 4)[Li] 0001 putself 0002 send , nil 0005 putself 0006 send , nil 0009 putself 0010 send , nil 0013 setn 3 0015 send , nil 0018 pop 0019 leave "********* PRISM *************" == disasm: #@:3 (3,0)-(3,10)> 0000 putnil ( 3)[Li] 0001 putself 0002 send , nil 0005 putself 0006 send , nil 0009 putself 0010 send , nil 0013 setn 3 0015 send , nil 0018 pop 0019 leave ``` Fixes ruby/prism#1963 commit 9e7ca2c3c9d2fbdcdf7f3b6c0b8c63b2dbb08ebe Author: BurdetteLamar AuthorDate: 2023-12-09 05:02:14 +0900 Commit: Peter Zhu CommitDate: 2023-12-09 05:13:11 +0900 RDoc for Complex commit 98e3552cfb80d4d3a8176d9969ea4956adee93d5 Author: Kevin Newton AuthorDate: 2023-12-09 00:10:43 +0900 Commit: git[bot] CommitDate: 2023-12-09 03:59:52 +0900 [ruby/prism] Add necessary encoding flags for symbols and regex This doesn't actually fix the encodings for symbols and regex, unfortunately. But I wanted to get this change in because it is the last AST change we're going to make before 3.3 is released. So, if consumers want, they can start to check these flags to determine the encoding, even though it will be wrong. Then once we actually set them correctly, everything should work. https://github.com/ruby/prism/commit/9b35f7e891 commit a94a2eea34a7d6e1bd0e97b5a3bc73adcfcbcb31 Author: Benoit Daloze AuthorDate: 2023-01-05 22:52:13 +0900 Commit: git[bot] CommitDate: 2023-12-09 02:01:23 +0900 [rubygems/rubygems] Upstream RubyGems changes from TruffleRuby https://github.com/rubygems/rubygems/commit/749a508968 commit f2c13ff9e8646ea1f05498707c8e972379456883 Author: Schneems AuthorDate: 2023-12-09 01:41:23 +0900 Commit: git[bot] CommitDate: 2023-12-09 01:49:33 +0900 [ruby/syntax_suggest] v2.0.0 https://github.com/ruby/syntax_suggest/commit/53b2a1b03c commit a54eb9c6f9c12816f6befefd3828b78689076549 Author: Kevin Newton AuthorDate: 2023-12-08 23:40:26 +0900 Commit: git[bot] CommitDate: 2023-12-08 23:40:32 +0900 [ruby/prism] A couple of small dot enhancements https://github.com/ruby/prism/commit/5642a57f39 commit 0166040939fd9057a7fb724e290fbe6c9cc036c2 Author: Aaron Patterson AuthorDate: 2023-12-08 09:37:24 +0900 Commit: git[bot] CommitDate: 2023-12-08 23:35:26 +0900 [ruby/prism] Hashes need to deoptimize based on their contents If a hash has children that are not "basic" types of objects, then we can't consider the hash to be a static literal. Fixes: #2015 https://github.com/ruby/prism/commit/ca2523137d commit 892b5f10d52bacaf8c6b430d0e9a95dc0ea36834 Author: Kevin Newton AuthorDate: 2023-12-08 23:26:30 +0900 Commit: git[bot] CommitDate: 2023-12-08 23:34:34 +0900 [ruby/prism] More closely match CRuby error messages https://github.com/ruby/prism/commit/1ed07a0c6d commit 0204523fe7ccafba30a4d2465946095f2603c7eb Author: Benoit Daloze AuthorDate: 2023-12-07 06:44:37 +0900 Commit: Benoit Daloze CommitDate: 2023-12-08 21:59:40 +0900 Improve Fiber#kill docs and simplify the NEWS entry to let the documentation explain commit 49cdf063d6275151075ffd94c3d013f6c19b31f7 Author: Akinori MUSHA AuthorDate: 2023-12-08 21:36:12 +0900 Commit: git[bot] CommitDate: 2023-12-08 21:37:30 +0900 [ruby/set] Bump version to 1.0.4 https://github.com/ruby/set/commit/efc8c8c9f5 commit cc9826503d989df877adbcd94d39a6ff78d0b785 Author: Hiroshi SHIBATA AuthorDate: 2023-12-08 20:25:04 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-08 20:25:04 +0900 Revert "Skip to warn like 'bigdecimal/util' feature." This reverts commit 8f6cf72e661e36410848c1451335fd28a32cecdf. commit f2c84c48842d47e7612c78d0627542b596945586 Author: Hiroshi SHIBATA AuthorDate: 2023-12-08 15:33:13 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-08 16:01:01 +0900 Pick commit from https://github.com/rubygems/rubygems/pull/7085 Co-authored-by: Samuel Giddins commit dab30b4d71efa40220a340e1ef7936824b6cc6c6 Author: Hiroshi SHIBATA AuthorDate: 2023-12-08 15:32:25 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-08 16:01:01 +0900 Pick commit from https://github.com/rubygems/rubygems/pull/7227 Co-authored-by: David Rodríguez commit 01a2a0abc6a7deac27d66819531d53ceb7855c6a Author: David Rodríguez AuthorDate: 2023-12-08 02:11:56 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-08 16:01:01 +0900 [rubygems/rubygems] Migrate documentation to be generated with nronn https://github.com/rubygems/rubygems/commit/55281f0eaa commit 1c3aa4b97709676f2a254d0047d061e6bdff0472 Author: David Rodríguez AuthorDate: 2023-12-08 03:22:20 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-08 16:01:01 +0900 [rubygems/rubygems] Add extra blank line to `bundle outdated` docs If it's not there, when migrating to `nronn`, generated man page is messed up. https://github.com/rubygems/rubygems/commit/7161347648 commit dc64a04a12e25cb98aa24ccbd8a57f6aa5a43d65 Author: David Rodríguez AuthorDate: 2023-12-08 06:51:14 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-08 16:01:01 +0900 [rubygems/rubygems] Revert "Merge pull request #7148 from Paul-Bob/improvement/include_response_body_on_fetch_http_error" This reverts commit https://github.com/rubygems/rubygems/commit/e5a4fd9eb617, reversing changes made to https://github.com/rubygems/rubygems/commit/c5a5363b0c98. https://github.com/rubygems/rubygems/commit/e21c45c4c3 commit 8f6cf72e661e36410848c1451335fd28a32cecdf Author: Hiroshi SHIBATA AuthorDate: 2023-12-08 15:57:08 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-08 15:57:08 +0900 Skip to warn like 'bigdecimal/util' feature. commit 64e985333f4fa7e4ba06454ef50c41e56a22768d Author: David Rodríguez AuthorDate: 2023-12-08 05:35:47 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-08 15:55:15 +0900 Improve bundled gems warnings for subfeatures Before, when requiring "bigdecimal/math" in a Bundler context: > /Users/deivid/.asdf/installs/ruby/3.3.0-dev/lib/ruby/3.3.0+0/bigdecimal/math.rb:2: warning: bigdecimal was loaded from the standard library, but will no longer be part of the default gems since Ruby 3.4.0. Add bigdecimal to your Gemfile or gemspec. After: > foo.rb:1: warning: bigdecimal/math is found in bigdecimal, which will no longer be part of the default gems since Ruby 3.4.0. Add bigdecimal to your Gemfile or gemspec. commit a530dfef2be3934decd975100585e3978ef49173 Author: David Rodríguez AuthorDate: 2023-12-08 05:30:26 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-08 15:55:15 +0900 Improve bundled gem warnings Before, when requiring "bigdecimal" in a Bundler context: > foo.rb:1: warning: bigdecimal which will no longer be part of the default gems since Ruby 3.4.0. Add bigdecimal to your Gemfile or gemspec. After: > foo.rb:1: warning: bigdecimal was loaded from the standard library, but will no longer be part of the default gems since Ruby 3.4.0. Add bigdecimal to your Gemfile or gemspec. commit d61af5c49a9cc65c7009b9d2036bf43a527e8036 Author: David Rodríguez AuthorDate: 2023-12-08 05:29:25 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-08 15:55:15 +0900 The SINCE and WARNED hashes take gem names, not features commit 4817166e54ad98f9b3e9d06e9e8c7ccff992a957 Author: Samuel Giddins AuthorDate: 2023-10-21 09:56:22 +0900 Commit: git[bot] CommitDate: 2023-12-08 15:09:51 +0900 [rubygems/rubygems] Extract generate_index command to rubygems-generate_index gem So generate_index can be implemented with dependencies, such as the compact index Took this approach from feedback in https://github.com/rubygems/rubygems/pull/6853 Running `gem generate_index` by default will use an installed rubygems-generate_index, or install and then use the command from the gem Apply suggestions from code review https://github.com/rubygems/rubygems/commit/fc1cb9bc9e Co-authored-by: Hiroshi SHIBATA commit 0166d56f2bb062ddf56a0e7757849da68b66fe62 Author: Martin Emde AuthorDate: 2023-12-08 13:18:09 +0900 Commit: git[bot] CommitDate: 2023-12-08 14:51:03 +0900 [rubygems/rubygems] Don't memoize in NameTuple lock_name The result of this is already memoized and no other NameTuple methods memoize. https://github.com/rubygems/rubygems/commit/b7cce0c64a commit 352a885a0f1a4d4576c686301ee71ea887a345e5 Author: Koichi Sasada AuthorDate: 2023-11-17 02:29:11 +0900 Commit: Koichi Sasada CommitDate: 2023-12-08 13:16:19 +0900 Thread specific storage APIs This patch introduces thread specific storage APIs for tools which use `rb_internal_thread_event_hook` APIs. * `rb_internal_thread_specific_key_create()` to create a tool specific thread local storage key and allocate the storage if not available. * `rb_internal_thread_specific_set()` sets a data to thread and tool specific storage. * `rb_internal_thread_specific_get()` gets a data in thread and tool specific storage. Note that `rb_internal_thread_specific_get|set(thread_val, key)` can be called without GVL and safe for async signal and safe for multi-threading (native threads). So you can call it in any internal thread event hooks. Further more you can call it from other native threads. Of course `thread_val` should be living while accessing the data from this function. Note that you should not forget to clean up the set data. commit 9b7a964318d04beb82680ff1d0c6eb571f4b8b5e Author: Nobuyoshi Nakada AuthorDate: 2023-12-07 20:04:33 +0900 Commit: Nobuyoshi Nakada CommitDate: 2023-12-08 12:53:47 +0900 [Bug #19877] Flip-flop needs to be direct condition commit 8bb90f4d771d287644a3cf21bdda26c637f091e2 Author: Yuji Yaginuma AuthorDate: 2023-12-08 11:10:14 +0900 Commit: git[bot] CommitDate: 2023-12-08 12:25:43 +0900 [rubygems/rubygems] Use `Minitest::TestTask` in a template file for `minitest` `minitest` has introduced a rake task for running test on 5.16.0. https://github.com/minitest/minitest/blob/master/History.rdoc#5160--2022-06-14- This has some tasks related to running tests and it's useful for `minitest` user I think. https://github.com/minitest/minitest#rake-tasks- This PR changed to use the task in a template file for `minitest` https://github.com/rubygems/rubygems/commit/7a86d13062 commit ac5fd58700b5576bfdd89ffe06dd4302b6721e5f Author: Takashi Kokubun AuthorDate: 2023-12-08 07:53:05 +0900 Commit: GitHub CommitDate: 2023-12-08 07:53:05 +0900 YJIT: Fix on-stack ISEQ comparison for auto_compact (#9164) commit 2755cb1b2fbc4a5f08ca56345b5945bd452da74e Author: David Rodríguez AuthorDate: 2023-12-08 06:10:33 +0900 Commit: git[bot] CommitDate: 2023-12-08 07:29:33 +0900 [rubygems/rubygems] Use modern hashes consistently https://github.com/rubygems/rubygems/commit/bb66253f2c commit 9d696aa20461d94c2d32e1e474bd036ade20c94d Author: Aaron Patterson AuthorDate: 2023-12-06 07:07:50 +0900 Commit: Aaron Patterson CommitDate: 2023-12-08 07:07:09 +0900 Support method calls inside `defined?` This commit supports all kinds of method calls (including methods with parameters) inside `defined?` calls. commit f76881c9af4256d984c0cd59bc1f6929134eded0 Author: BurdetteLamar AuthorDate: 2023-12-08 05:36:37 +0900 Commit: Peter Zhu CommitDate: 2023-12-08 06:34:41 +0900 RDoc for Complex commit 6816e8efcff3be75f8020cd1b0ea57d3cd664bbc Author: Adam Hess AuthorDate: 2023-10-13 03:15:53 +0900 Commit: Peter Zhu CommitDate: 2023-12-08 05:52:35 +0900 Free everything at shutdown when the RUBY_FREE_ON_EXIT environment variable is set, manually free memory at shutdown. Co-authored-by: Nobuyoshi Nakada Co-authored-by: Peter Zhu commit b361a800c22e0248bf126d77e96a7bd4f9c34d1b Author: Jemma Issroff AuthorDate: 2023-12-08 05:03:06 +0900 Commit: Jemma Issroff CommitDate: 2023-12-08 05:29:35 +0900 Added comment commit a0c7bb4328c981be5f3f0e82e7ef75fc8bbd51b6 Author: Jemma Issroff AuthorDate: 2023-12-08 04:13:33 +0900 Commit: Jemma Issroff CommitDate: 2023-12-08 05:29:35 +0900 [PRISM] Account for multiple arguments when compiling ArgumentsNode BreakNode, ReturnNode and NextNode all compile the ArgumentsNode directly, but we weren't accounting for multiple arguments. If there is more than one argument, we need to also emit a newarray instruction to put the arguments onto the stack commit 7738b31d390e70b26e913d86c133a70c8e65a645 Author: Jeremy Evans AuthorDate: 2023-12-01 08:30:30 +0900 Commit: Jeremy Evans CommitDate: 2023-12-08 04:27:55 +0900 Eliminate array allocation for f(1, *a, &arg), f(*a, **kw, &arg), and f(*a, kw: 1, &arg) These are similar to the f(1, *a, &lvar), f(*a, **kw, &lvar) and f(*a, kw: 1, &lvar) optimizations, but they use getblockparamproxy instruction instead of getlocal. This also fixes the else style to be more similar to the surrounding code. commit f5a01b091673b81cf2e1efa149f84763bdadad98 Author: Jeremy Evans AuthorDate: 2023-11-29 03:58:22 +0900 Commit: Jeremy Evans CommitDate: 2023-12-08 04:27:55 +0900 Add benchmark for recent optimization to avoid implicit allocations commit 13cd963500106b366c8df9eec5c1b6815e93f07f Author: Jeremy Evans AuthorDate: 2023-11-22 02:02:31 +0900 Commit: Jeremy Evans CommitDate: 2023-12-08 04:27:55 +0900 Prevent modification of splat array inside setup_parameters_complex For the following: ``` def f(*a); a end p f(*a, kw: 3) ``` `setup_parameters_complex` pushes `{kw: 3}` onto `a`. This worked fine back when `concatarray true` was used and `a` was already a copy. It does not work correctly with the optimization to switch to `concatarray false`. This duplicates the array on the callee side in such a case. This affects cases when passing a regular splat and a keyword splat (or literal keywords) in a method call, where the method does not accept keywords. This allocation could probably be avoided, but doing so would make `setup_parameters_complex` more complicated. commit aa808204bb3b84ad37e2c4722f9d00e07ab8f281 Author: Jeremy Evans AuthorDate: 2023-11-07 06:17:49 +0900 Commit: Jeremy Evans CommitDate: 2023-12-08 04:27:55 +0900 Eliminate array allocation for f(*a, kw: 1, &lvar) and f(*a, kw: 1, &@iv) Similar to the previous commit, but this handles the block pass case. commit 5e33f2b0e4c262ed0c7e524b11d020438c41f532 Author: Jeremy Evans AuthorDate: 2023-11-07 06:03:02 +0900 Commit: Jeremy Evans CommitDate: 2023-12-08 04:27:55 +0900 Eliminate array allocation for f(*a, kw: 1) In cases where the compiler can detect the hash is static, it would use duphash for the hash part. As the hash is static, there is no need to allocate an array. commit 95615872e32156d9add8fd3afd136dd73fd6aa1a Author: Jeremy Evans AuthorDate: 2023-11-07 05:39:57 +0900 Commit: Jeremy Evans CommitDate: 2023-12-08 04:27:55 +0900 Eliminate array allocation for f(*a, **lvar, &lvar) and f(*a, **@iv, &@iv) The compiler already eliminates the array allocation for f(*a, &lvar) and f(*a, &@iv). If that is safe, then eliminating it for f(*a, **lvar) and f(*a, **@iv) as the last commit did is as safe, and eliminating it for f(*a, **lvar, &lvar) and f(*a, **@iv, &@iv) is also as safe. commit 1731dd05a7f9fcdef1ea1c25f7a3e072679c3d3a Author: Jeremy Evans AuthorDate: 2023-11-07 05:37:16 +0900 Commit: Jeremy Evans CommitDate: 2023-12-08 04:27:55 +0900 Eliminate array allocation for f(*a, **lvar) and f(*a, **@iv) The compiler already eliminates the array allocation for f(*a, &lvar) and f(*a, &@iv), and eliminating the array allocation for keyword splat is as safe as eliminating it for block passes. commit c70c1d2a9592bcea916500eb16ae58f6de4b9a3f Author: Jeremy Evans AuthorDate: 2023-11-07 05:08:03 +0900 Commit: Jeremy Evans CommitDate: 2023-12-08 04:27:55 +0900 Eliminate array allocation for f(1, *a, &lvar) and f(1, *a, &@iv) Due to how the compiler works, while f(*a, &lvar) and f(*a, &@iv) do not allocate an array, but f(1, *a, &lvar) and f(1, *a, &@iv) do. It's probably possible to fix this in the compiler, but seems easiest to fix this in the peephole optimizer. Eliminating this array allocation is as safe as the current elimination of the array allocation for f(*a, &lvar) and f(*a, &@iv). commit 40a2afd08fe1b921f1052b29031abfa1869e0557 Author: Jeremy Evans AuthorDate: 2023-11-04 08:56:58 +0900 Commit: Jeremy Evans CommitDate: 2023-12-08 04:27:55 +0900 Eliminate array allocation for f(1, *a) Due to how the compiler works, while f(*a) does not allocate an array f(1, *a) does. This is possible to fix in the compiler, but the change is much more complex. This attempts to fix the issue in a simpler way using the peephole optimizer. Eliminating this array allocation is safe, since just as in the f(*a) case, nothing else on the caller side can modify the array. commit 41b299d6391261c11025e88b54743bb903606fb3 Author: Matt Valentine-House AuthorDate: 2023-12-08 00:00:39 +0900 Commit: Jemma Issroff CommitDate: 2023-12-08 04:12:20 +0900 [PRISM] Stop catch table entries being deleted by the optimiser commit 3081c83169c55ef7eead6222e49248e09232c22c Author: Jeremy Evans AuthorDate: 2023-10-27 09:03:17 +0900 Commit: Jeremy Evans CommitDate: 2023-12-08 03:29:33 +0900 Support tracing of struct member accessor methods This follows the same approach used for attr_reader/attr_writer in 2d98593bf54a37397c6e4886ccc7e3654c2eaf85, skipping the checking for tracing after the first call using the call cache, and clearing the call cache when tracing is turned on/off. Fixes [Bug #18886] commit 1721bb9dc6dcc3ecec05e9d6f72654099460ef50 Author: Takashi Kokubun AuthorDate: 2023-12-08 02:41:06 +0900 Commit: Takashi Kokubun CommitDate: 2023-12-08 02:42:56 +0900 Skip a flaky objspace test on Visual Studio This seems to happen only on VisualStudio: https://github.com/ruby/ruby/actions/runs/7130917319/job/19418375386 It fails relatively frequently. Nobody seems actively working on it, so let's skip it until somebody starts working on it. commit 3a88de3ca73052809f5c0bfb4ef8cd435b29ae5f Author: Jeremy Evans AuthorDate: 2023-10-26 04:49:28 +0900 Commit: Jeremy Evans CommitDate: 2023-12-08 02:30:36 +0900 Support eval "return" at toplevel Since Ruby 2.4, `return` is supported at toplevel. This makes `eval "return"` also supported at toplevel. This mostly uses the same tests as direct `return` at toplevel, with a couple differences: `END {return if false}` is a SyntaxError, but `END {eval "return" if false}` is not an error since the eval is never executed. `END {return}` is a SyntaxError, but `END {eval "return"}` is a LocalJumpError. The following is a SyntaxError: ```ruby class X nil&defined?0--begin e=no_method_error(); return; 0;end end ``` However, the following is not, because the eval is never executed: ```ruby class X nil&defined?0--begin e=no_method_error(); eval "return"; 0;end end ``` Fixes [Bug #19779] commit 0c3593b6573b4186c980fb4ea7635bf95261c749 Author: John Hawthorn AuthorDate: 2023-12-07 12:29:06 +0900 Commit: John Hawthorn CommitDate: 2023-12-08 02:23:02 +0900 Use free with ruby_dtoa In ae0ceafb0c0d05cc80623b525070255e3abb34ef ruby_dtoa was switched to use malloc instead of xmalloc, which means that consumers should be using free instead of xfree. Otherwise we will artificially shrink oldmalloc_increase_bytes. commit 5f81f58b2696db3c1c3fc44a2c83dbff85747100 Author: John Hawthorn AuthorDate: 2023-12-07 12:17:40 +0900 Commit: John Hawthorn CommitDate: 2023-12-08 02:22:21 +0900 Use xfree in hash_st_free st.c redefines malloc and free to be ruby_xmalloc and ruby_xfree, so when this was copied into hash.c it ended up mismatching an xmalloc with a regular free, which ended up inflating oldmalloc_increase_bytes when hashes were freed by minor GC. commit ca204a20231f1ecabf5a7343aec49c3ea1bac90a Author: Jeremy Evans AuthorDate: 2023-12-08 01:35:55 +0900 Commit: GitHub CommitDate: 2023-12-08 01:35:55 +0900 Fix keyword splat passing as regular argument Since Ruby 3.0, Ruby has passed a keyword splat as a regular argument in the case of a call to a Ruby method where the method does not accept keyword arguments, if the method call does not contain an argument splat: ```ruby def self.f(obj) obj end def self.fs(*obj) obj[0] end h = {a: 1} f(**h).equal?(h) # Before: true; After: false fs(**h).equal?(h) # Before: true; After: false a = [] f(*a, **h).equal?(h) # Before and After: false fs(*a, **h).equal?(h) # Before and After: false ``` The fact that the behavior differs when passing an empty argument splat makes it obvious that something is not working the way it is intended. Ruby 2 always copied the keyword splat hash, and that is the expected behavior in Ruby 3. This bug is because of a missed check in setup_parameters_complex. If the keyword splat passed is not mutable, then it points to an existing object and not a new object, and therefore it must be copied. Now, there are 3 specs for the broken behavior of directly using the keyword splatted hash. Fix two specs and add a new version guard. Do not keep the specs for the broken behavior for earlier Ruby versions, in case this fix is backported. For the ruby2_keywords spec, just remove the related line, since that line is unrelated to what the spec is testing. Co-authored-by: Nobuyoshi Nakada commit 195dbf241f800556731c190b0e4368224afe2e11 Author: Alan Wu AuthorDate: 2023-12-07 11:00:37 +0900 Commit: Alan Wu CommitDate: 2023-12-08 01:16:12 +0900 Fix potential compaction issue in env_copy() `src_ep[VM_ENV_DATA_INDEX_ME_CREF]` was read out and held without marking across the allocation in vm_env_new(). In case vm_env_new() ran compaction, an invalid reference could have been written into `copied_env`. It might've been hard to actually produce a crash with this issue due to the pinning marking of the field in rb_execution_context_mark(). commit 050806f4252dce2698260d905f7c86c621c1ec63 Author: Alan Wu AuthorDate: 2023-12-07 10:35:40 +0900 Commit: Alan Wu CommitDate: 2023-12-08 01:16:12 +0900 Add missing write barrier to env_copy() Previously, the following crashed with `vm_assert_env:imemo_type_p(obj, imemo_env)` due to missing a missing WB: o = Object.new def o.foo(n) freeze GC.stress = 1 # inflate block nesting get an imemo_env for each level n.tap do |i| i.tap do |local| return Ractor.make_shareable(-> do local + i + n end) end end ensure GC.stress = false GC.verify_internal_consistency end p o.foo(1)[] By the time the recursive env_copy() call returns, `copied_env` could have aged or have turned greyed, so we need a WB for the `ep[VM_ENV_DATA_INDEX_SPECVAL]` assignment which adds an edge. Fix: 674eb7df7f409099f33da77293d9658e09b470d6 commit 5809b75019dd3a253bb0e45c37bbf0cca0400911 Author: Stan Lo AuthorDate: 2023-12-08 01:09:09 +0900 Commit: git[bot] CommitDate: 2023-12-08 01:09:15 +0900 [ruby/irb] Debugging command warning should not be specific to the `debug` command (https://github.com/ruby/irb/pull/806) https://github.com/ruby/irb/commit/b7b57311cc commit c05278e425a7b7cadf0bf299ecfbe0ae9525c75c Author: Kevin Newton AuthorDate: 2023-12-08 00:39:21 +0900 Commit: git[bot] CommitDate: 2023-12-08 01:00:41 +0900 [ruby/prism] Update ordering of integer base flags https://github.com/ruby/prism/commit/d711950d5f commit 0dc40bd2b740898fac4c6d4193ab6cd7ad52c05d Author: Peter Zhu AuthorDate: 2023-12-07 06:38:59 +0900 Commit: Peter Zhu CommitDate: 2023-12-08 00:49:06 +0900 Check need_major_gc during GC stress need_major_gc is set when a major GC is required. However, if gc_stress_no_major is also set, then it will not actually run a major GC. For example, the following script will sometimes crash: ``` GC.stress = 1 50000.times.map { [] } ``` With the following message: ``` [BUG] cannot create a new page after major GC ``` commit b8df6b9e01d8971235ea42fc9098ce392f791928 Author: Jemma Issroff AuthorDate: 2023-12-08 00:08:16 +0900 Commit: Jemma Issroff CommitDate: 2023-12-08 00:34:39 +0900 [PRISM] Don't pop arguments on a return node Since ReturnNodes don't get popped, their arguments shouldn't either commit cbc0e0bef08f9389f5bbe76de016795f01c3bc76 Author: KJ Tsanaktsidis AuthorDate: 2023-11-27 14:50:05 +0900 Commit: Peter Zhu CommitDate: 2023-12-08 00:19:35 +0900 Fix GC.verify_compaction_references not moving every object The intention of GC.verify_compaction_references is, I believe, to force every single movable object to be moved, so that it's possible to debug native extensions which not correctly updating their references to objects they mark as movable. To do this, it doubles the number of allocated pages for each size pool, and sorts the heap pages so that the free ones are swept first; thus, every object in an old page should be moved into a free slot in one of the new pages. This worked fine until movement of objects _between_ size pools during compaction was implemented. That causes some problems for verify_compaction_references: * We were doubling the number of pages in each size pool, but actually if some objects need to move into a _different_ pool, there's no guarantee that they'll be enough room in that one. * It's possible for the sweep & compact cursors to meet in one size pool before all the objects that want to move into that size pool from another are processed by the compaction. You can see these problems by changing some of the movement tests in test_gc_compact.rb to try and move e.g. 50,000 objects instead of 500; the test is not able to actually move all of the objects in a single compaction run. To fix this, we do two things in verify_compaction_references: * Firstly, we add enough pages to every size pool to make them the same size. This ensures that their compact cursors will all have space to move during compaction (even if that means empty pages are pointlessly compacted) * Then, we examine every object and determine where it _wants_ to be compacted into. We use this information to add additional pages to each size pool to handle all objects which should live there. With these two changes, we can move arbitrary amounts of objects into the correct size pool in a single call to verify_compaction_references. My _motivation_ for performing this work was to try and fix some test stability issues in test_gc_compact.rb. I now no longer think that we actually see this particular bug in rubyci.org, but I also think verify_compaction_references should do what it says on the tin, so it's worth keeping. [Bug #20022] commit 5d832d16d9878766dfe527934ef1ad64698b9bf8 Author: KJ Tsanaktsidis AuthorDate: 2023-11-27 14:49:18 +0900 Commit: Peter Zhu CommitDate: 2023-12-08 00:19:35 +0900 Add objspace_each_pages to gc.c This works like objspace_each_obj, except instead of being called with the start & end address of each page, it's called with the page structure itself. [Bug #20022] commit 10bc0bd4ab9b886b77ba0cb4cdb2fa121a84c835 Author: Kevin Newton AuthorDate: 2023-12-07 23:34:16 +0900 Commit: git[bot] CommitDate: 2023-12-07 23:39:11 +0900 [ruby/prism] Remove warnings check from parse_success? method https://github.com/ruby/prism/commit/e30a241fb3 commit 8e86a4347e8943305d2667865154fba046eb862d Author: Matt Valentine-House AuthorDate: 2023-12-07 19:24:33 +0900 Commit: Jemma Issroff CommitDate: 2023-12-07 23:38:24 +0900 [PRISM] Ensure should set correct end_label commit c4b969535055ab0debf47abc26d00c1b06c686cc Author: Matt Valentine-House AuthorDate: 2023-12-07 07:20:38 +0900 Commit: Jemma Issroff CommitDate: 2023-12-07 23:38:24 +0900 [PRISM] Rescue should set correct end_label In order for a break inside the rescue to have the correct jump target commit 071df40495e31f6d3fd14ae8686b01edf9a689e3 Author: yui-knk AuthorDate: 2023-12-07 17:26:15 +0900 Commit: yui-knk CommitDate: 2023-12-07 21:07:38 +0900 Lrama v0.5.12 commit 30a1ccbc5c0c7c3736dbd3b020e5ca5fbf657cbc Author: Yusuke Endoh AuthorDate: 2023-12-07 19:50:55 +0900 Commit: Yusuke Endoh CommitDate: 2023-12-07 19:50:55 +0900 NEWS: Move "interruptible name resolution" to "Stdlib updates" section commit d69af4788a923f9afab63104a7adb72a02d37745 Author: Matheus Richard AuthorDate: 2023-12-07 19:49:55 +0900 Commit: git[bot] CommitDate: 2023-12-07 19:50:00 +0900 [ruby/io-console] [DOC] Add documentation for IO#cursor ruby/io-console#50 https://github.com/ruby/io-console/commit/ee752ce771 commit bc6a0ede4a05d19dc999d05c84b46a0258ab0528 Author: Hiroshi SHIBATA AuthorDate: 2023-12-07 18:56:23 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-07 18:56:23 +0900 Bump up bundled net-ftp gem version to 0.3.0 commit abf192eb16ea845ac11743a32bd2f3e2d234488b Author: Tanaka Akira AuthorDate: 2023-12-07 18:28:47 +0900 Commit: Tanaka Akira CommitDate: 2023-12-07 18:28:47 +0900 always omit test_ai_addrconfig. commit d2ba8ea54a4089959afdeecdd963e3c4ff391748 Author: KJ Tsanaktsidis AuthorDate: 2023-12-07 17:55:15 +0900 Commit: GitHub CommitDate: 2023-12-07 17:55:15 +0900 Set AI_ADDRCONFIG when making getaddrinfo(3) calls for outgoing conns (#7295) When making an outgoing TCP or UDP connection, set AI_ADDRCONFIG in the hints we send to getaddrinfo(3) (if supported). This will prompt the resolver to _NOT_ issue A or AAAA queries if the system does not actually have an IPv4 or IPv6 address (respectively). This makes outgoing connections marginally more efficient on non-dual-stack systems, since we don't have to try connecting to an address which can't possibly work. More importantly, however, this works around a race condition present in some older versions of glibc on aarch64 where it could accidently send the two outgoing DNS queries with the same DNS txnid, and get confused when receiving the responses. This manifests as outgoing connections sometimes taking 5 seconds (the DNS timeout before retry) to be made. Fixes #19144 commit c6eb355e04b2f9ffe9e78fcec259c901b3905cc9 Author: Takashi Kokubun AuthorDate: 2023-12-07 17:02:52 +0900 Commit: Takashi Kokubun CommitDate: 2023-12-07 17:03:03 +0900 Revert "Warn `it` only with -W:deprecated" This reverts commit 5458252bb0edcd498e6bd4bea57fd7500bacd54c. Revert "Fallback rb_warn_deprecated for UNIVERSAL_PARSER" This reverts commit 680be886f4d807073f24beed36648ef76219e4f7. matz actually preferred always warning `it`. commit 680be886f4d807073f24beed36648ef76219e4f7 Author: Takashi Kokubun AuthorDate: 2023-12-07 16:57:43 +0900 Commit: Takashi Kokubun CommitDate: 2023-12-07 17:00:36 +0900 Fallback rb_warn_deprecated for UNIVERSAL_PARSER commit 5458252bb0edcd498e6bd4bea57fd7500bacd54c Author: Takashi Kokubun AuthorDate: 2023-12-07 16:44:01 +0900 Commit: Takashi Kokubun CommitDate: 2023-12-07 16:44:02 +0900 Warn `it` only with -W:deprecated commit a41d6c825c4b1ed5699fd7880edeb8d4adfa5197 Author: Hiroshi SHIBATA AuthorDate: 2023-12-07 16:21:55 +0900 Commit: git[bot] CommitDate: 2023-12-07 16:22:20 +0900 [ruby/open-uri] Bump up 0.4.1 https://github.com/ruby/open-uri/commit/d72508a7f4 commit ae76c8a11e707176a53c84016256646308f36207 Author: Takashi Kokubun AuthorDate: 2023-12-07 16:14:59 +0900 Commit: GitHub CommitDate: 2023-12-07 16:14:59 +0900 Warn `it` (#9152) https://bugs.ruby-lang.org/issues/18980 commit 41c00bc97ebf237fd04ce740d0dfd0681f4a28c7 Author: Andrew Kane AuthorDate: 2023-11-10 08:24:39 +0900 Commit: git[bot] CommitDate: 2023-12-07 16:00:54 +0900 [ruby/open-uri] Set default for max_redirects and add exception class https://github.com/ruby/open-uri/commit/dcdcb885cc commit d97479f9c966bd2c9d52c8be28aca9431760c610 Author: Andrew Kane AuthorDate: 2023-01-14 13:27:05 +0900 Commit: git[bot] CommitDate: 2023-12-07 16:00:53 +0900 [ruby/open-uri] Add :max_redirects option https://github.com/ruby/open-uri/commit/7fd5ea09a7 commit 7d32830b8ce14cc130d052a4aa67495a34ed55dc Author: Ellen Marie Dash AuthorDate: 2023-12-01 10:20:38 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-07 13:56:23 +0900 [rubygems/rubygems] Make --build-root disable auto-user-install. https://github.com/rubygems/rubygems/commit/6a06b0763f commit 33bd95625756562f4865fbc6ad5c39e0cfbc26d6 Author: David Rodríguez AuthorDate: 2023-12-01 20:53:43 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-07 13:56:22 +0900 [rubygems/rubygems] Better approach to falling back to user installation when GEM_HOME not writable https://github.com/rubygems/rubygems/commit/f67bced16b commit 0f3f907e17bba1b94c5e202cb57988af8c6c91fc Author: David Rodríguez AuthorDate: 2023-12-01 20:52:47 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-07 13:56:22 +0900 [rubygems/rubygems] Add some early assertions to make sure the test is progressing fine If an error happens during the install command, it will fail in an strange way right now. https://github.com/rubygems/rubygems/commit/2b6e0c703a commit aabf2ce181053d37cbf1d6db55ff533055c96d83 Author: Vít Ondruch AuthorDate: 2023-11-28 23:38:51 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-07 13:55:31 +0900 [rubygems/rubygems] Use globals variables for standard input/output Replace use of `STDIN`, `STDOUT` and `STDERR` constants by their `$stdin`, `$stdout` and `$stderr` global variable equivalents. This enables easier testing via standard means, such as `assert_output` for minitest or `expect { print 'foo' }.to output.to_stdout` for RSpec test suites. https://github.com/rubygems/rubygems/commit/a0a6fc1b76 commit d89280e8bf6496aa83326b5f9c293724bd1cc1e9 Author: Dustin Brown AuthorDate: 2023-12-07 12:25:29 +0900 Commit: GitHub CommitDate: 2023-12-07 12:25:29 +0900 Copy encoding flags when copying a regex [Bug #20039] * :bug: Fixes [Bug #20039](https://bugs.ruby-lang.org/issues/20039) When a Regexp is initialized with another Regexp, we simply copy the properties from the original. However, the flags on the original were not being copied correctly. This caused an issue when the original had multibyte characters and was being compared with an ASCII string. Without the forced encoding flag (`KCODE_FIXED`) transferred on to the new Regexp, the comparison would fail. See the included test for an example. Co-authored-by: Nobuyoshi Nakada commit 1ace218690d76496c5a54c45691515f8f6410a49 Author: Yusuke Endoh AuthorDate: 2023-12-07 12:11:19 +0900 Commit: Yusuke Endoh CommitDate: 2023-12-07 12:11:19 +0900 Remove a note for `bundle exec ruby` not printing a warning The implementation limitation is fixed by https://github.com/rubygems/rubygems/pull/7224 commit 214f6d6598be8437284dede9eb9a041a3ebfb24e Author: Hiroshi SHIBATA AuthorDate: 2023-12-07 10:56:34 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-07 11:37:08 +0900 Move replace_require into bundled_gems.rb commit 4f213ea1baa590c463c3554a6ff418d10dc291e0 Author: Soutaro Matsumoto AuthorDate: 2023-12-07 10:37:00 +0900 Commit: GitHub CommitDate: 2023-12-07 10:37:00 +0900 Fix SEGV caused by `GC::Profiler.raw_data` (#9122) commit 5078aa825c943f757f53a12264ab5e5c4cf1542e Author: hogelog AuthorDate: 2023-12-06 23:19:38 +0900 Commit: Yusuke Endoh CommitDate: 2023-12-07 09:45:46 +0900 Add NEWS for Range#overlap? commit ce094e8556014b5c1f175ff7c1b881339ad84a41 Author: Haldun Bayhantopcu AuthorDate: 2023-12-07 07:05:55 +0900 Commit: git[bot] CommitDate: 2023-12-07 07:15:16 +0900 [ruby/prism] Emit error for constant assignments in defs https://github.com/ruby/prism/commit/864b06f90e commit 9d9865d9bc2f563c2c600ec53cc71926441b973f Author: Alan Wu AuthorDate: 2023-12-07 05:20:05 +0900 Commit: Alan Wu CommitDate: 2023-12-07 06:42:53 +0900 YJIT: Add some object validity assertions We've seen quite a few compaction bugs lately, and these assertions should give clearer symptoms. We only call class_of() on objects that the Ruby code can see. commit c5a4409f20e816d3777ebd2c23b894022342a975 Author: Kevin Newton AuthorDate: 2023-12-07 05:52:26 +0900 Commit: git[bot] CommitDate: 2023-12-07 06:34:48 +0900 [ruby/prism] Simplify unterminated string https://github.com/ruby/prism/commit/ef512ca914 commit c8b60c8ac2c8bbd077150792b5b207e983ab3634 Author: Matt Valentine-House AuthorDate: 2023-12-07 05:22:18 +0900 Commit: Matt Valentine-House CommitDate: 2023-12-07 06:12:08 +0900 [PRISM] Correct depth offset for block local vars Blocks should always look at their own local table first, even when defined inside an ensure/rescue or something else that uses depth offset. We can ignore the depth offset if we're doing local lookups inside a block commit fe6ee5e92148755b75ffd00ab29611b59a416d5a Author: Kevin Newton AuthorDate: 2023-12-07 05:32:53 +0900 Commit: git[bot] CommitDate: 2023-12-07 05:50:02 +0900 [ruby/prism] Move flag position consistently to front https://github.com/ruby/prism/commit/6e69a81737 commit cbb941f58a236d95d9e95c3f6dbd4510c04351f0 Author: TSUYUSATO Kitsune AuthorDate: 2023-12-02 13:00:11 +0900 Commit: git[bot] CommitDate: 2023-12-07 05:48:11 +0900 [ruby/prism] Fix closing loc for string literals Fix https://github.com/ruby/prism/pull/1974 https://github.com/ruby/prism/commit/453d403593 commit a57186b9d1b0db3a88e5e9082347903b109f7d0e Author: Haldun Bayhantopcu AuthorDate: 2023-12-06 18:39:42 +0900 Commit: git[bot] CommitDate: 2023-12-07 05:38:22 +0900 [ruby/prism] Fix one potential memory leak and silence one false positive report. https://github.com/ruby/prism/commit/9608aa386e commit a439fc2f175f5c272886a7be57c6444015450401 Author: Takashi Kokubun AuthorDate: 2023-12-07 05:19:43 +0900 Commit: GitHub CommitDate: 2023-12-07 05:19:43 +0900 YJIT: Avoid register allocation conflict with a higher stack_idx (#9143) YJIT: Avoid register allocation conflict with a higher stack_idx commit 9336bbb0b268cb655e6c07ad2a83b9a28cb98911 Author: Eric Mueller AuthorDate: 2023-12-02 13:23:18 +0900 Commit: git[bot] CommitDate: 2023-12-07 05:05:25 +0900 [rubygems/rubygems] Bundler::Fetcher uses Bundler::CIDetector Additionally, the result is memoized, as it's used twice in a row. This change does result in a net behavioral diff, as the list of ENVs being checked has been updated (now includes buildkite, taskcluster, cirrus, dsari, and drops buildbox and snap) https://github.com/rubygems/rubygems/commit/3fb445a5a1 commit 6fd3b358ff1e1745036286be7007cd0d6ebdcdd7 Author: Eric Mueller AuthorDate: 2023-12-02 13:20:27 +0900 Commit: git[bot] CommitDate: 2023-12-07 05:05:25 +0900 [rubygems/rubygems] Duplicate Gem::CIDetector into bundler Because bundler needs to support older versions of rubygems, we can't actually rely on Gem::CIDetector (yet - in a year or so they might be able to consolidate, if they don't change futher). So we're copying it into the Bundler:: namespace, and enforcing that they stay completely in sync with a test. No other tests are needed, since Gem::CIDetector is already tested, and this is and will remain identical. https://github.com/rubygems/rubygems/commit/abc67f0da1 commit a6c912a80de27a5022528802305e1e97fe5b2678 Author: Eric Mueller AuthorDate: 2023-11-29 11:41:22 +0900 Commit: git[bot] CommitDate: 2023-12-07 05:05:24 +0900 [rubygems/rubygems] Gem::UpdateSuggestion uses Gem::CIDetector https://github.com/rubygems/rubygems/commit/e5b0458342 commit b1b78c4f9ff0ff3a2570980b0012893eb03fc597 Author: Eric Mueller AuthorDate: 2023-11-29 11:13:03 +0900 Commit: git[bot] CommitDate: 2023-12-07 05:05:23 +0900 [rubygems/rubygems] Introduce the Gem::CIDetector This is based on the list in Gem::UpdateSuggestion and Bundler::Fetcher; these have similar purposes (determining whether/what CI we're executing in), and can benefit from being combined and updated (they're both slightly out of date). Noteable changes: * We'll consider ourselves to be on a CI in more cases - if CI_NAME or TASKCLUSTER_ROOT_URL are set specifically, since those represent two cases that were either overlooked or are no longer covered by the existing implementation. (Or possibly TaskCluster still does provide RUN_ID, but failed to document it) * We will notice/track a few additional services in ci_strings (cirrus, dsari, taskcluster), stop tracking 'snap' (they went under in 2017), and update buildbox to buildkite (they've been called that for 8 years, and the BUILDBOX envs have been deprecated for 3). * We'll also sort/uniq/downcase the values (all of which only matter because of the special case of CI_NAME). https://github.com/rubygems/rubygems/commit/60652b942f commit 82072254a05c88648caac2bd51069681e37f91aa Author: Kevin Newton AuthorDate: 2023-12-07 04:26:27 +0900 Commit: git[bot] CommitDate: 2023-12-07 04:26:35 +0900 [ruby/prism] Update documentation for encodings https://github.com/ruby/prism/commit/18e6df0d4f commit 153c09f24be77b8db986c2914c141b5bd8f51f67 Author: Kevin Newton AuthorDate: 2023-12-07 02:54:16 +0900 Commit: Kevin Newton CommitDate: 2023-12-07 04:23:38 +0900 [prism] Handle string and xstring encodings commit 82f18baa21d0df59c30d8a6e60bf3e0991de1114 Author: Kevin Newton AuthorDate: 2023-12-05 02:51:22 +0900 Commit: Kevin Newton CommitDate: 2023-12-07 04:23:38 +0900 [ruby/prism] Provide flags for changing encodings https://github.com/ruby/prism/commit/e838eaff6f commit 9620ca678929f28dd8dab8e278e438a430a85022 Author: Jemma Issroff AuthorDate: 2023-12-06 23:45:04 +0900 Commit: Jemma Issroff CommitDate: 2023-12-07 03:05:03 +0900 [PRISM] Extract a PM_NOP helper commit 0316e666c07d020fac267e0a76952cf0dae07190 Author: Jemma Issroff AuthorDate: 2023-12-06 01:31:12 +0900 Commit: Jemma Issroff CommitDate: 2023-12-07 02:25:49 +0900 [PRISM] Fix ReturnNodes This code is almost exactly the same (fixed variable names) as what exists already in compile.c commit 12e3b07455fea0e99e6aaf1893a7883fb2b0197e Author: Peter Zhu AuthorDate: 2023-12-06 21:37:57 +0900 Commit: Peter Zhu CommitDate: 2023-12-07 01:34:07 +0900 Re-embed when removing Object instance variables Objects with the same shape must always have the same "embeddedness" (either embedded or heap allocated) because YJIT assumes so. However, using remove_instance_variable, it's possible that some objects are embedded and some are heap allocated because it does not re-embed heap allocated objects. This commit changes remove_instance_variable to re-embed Object instance variables when it becomes small enough. commit f80262b14d01a977ce386a5a377e911a90ce328d Author: Jemma Issroff AuthorDate: 2023-12-07 01:05:43 +0900 Commit: Jemma Issroff CommitDate: 2023-12-07 01:31:43 +0900 [PRISM] Account for nil parent in Call{Operator,And,Or}PathWriteNodes Prior to this commit, we were not accounting for the case of a nil parent in a CallXPathWriteNode, for example ::A ||= 1. This commit checks if the parent exists, and if not, uses Object as the inferred parent commit 64ab04da6ae15243e1615739f2529f37e532943d Author: Peter Zhu AuthorDate: 2023-12-07 01:02:17 +0900 Commit: git[bot] CommitDate: 2023-12-07 01:14:54 +0900 [ruby/bigdecimal] Clarify that JSON methods come from the JSON gem https://github.com/ruby/bigdecimal/commit/581725d4e5 commit 4a7151a8e4806917f1bdca2a5b5a3b82d7959d32 Author: Peter Zhu AuthorDate: 2023-12-07 00:16:58 +0900 Commit: Peter Zhu CommitDate: 2023-12-07 00:16:58 +0900 Deduplicate assertions in redblack_balance The bug in i686 was fixed in commit 71babe5536bdb2238509752d8706194ee57ff485. commit dab5a4b61aa43bd67221e89df9de67de0e3a97f6 Author: BurdetteLamar AuthorDate: 2023-11-17 06:46:01 +0900 Commit: git[bot] CommitDate: 2023-12-06 23:59:23 +0900 [ruby/bigdecimal] [DOC] Add section Methods for Working with JSON https://github.com/ruby/bigdecimal/commit/2edd8d0a23 commit 018dbf18d50b34a3ea564bfe0264a423de4b33bb Author: Jemma Issroff AuthorDate: 2023-12-05 06:40:59 +0900 Commit: Jemma Issroff CommitDate: 2023-12-06 23:55:48 +0900 [ruby/prism] Add locals_body_index to DefNode, BlockNode, LambdaNode The locals_body_index gives the index in the locals array where the locals from the body start. This allows compilers to easily index past the parameters in the locals array. https://github.com/ruby/prism/commit/5d4627b890 commit da1519b223e1accfcef1c831f9fdc6421724ea7c Author: eileencodes AuthorDate: 2023-12-06 04:08:21 +0900 Commit: Jemma Issroff CommitDate: 2023-12-06 23:46:19 +0900 [PRISM] Implement `PM_MATCH_PREDICATE_NODE` for `defined?` Ruby code: ```ruby defined? 1 in 1 ``` Instructions: ``` "********* Ruby *************" == disasm: #@:0 (0,0)-(0,16)> 0000 putobject "expression" 0002 leave "********* PRISM *************" == disasm: #@:0 (0,0)-(0,16)> 0000 putobject "expression" 0002 leave ``` commit 45471084484d18a7496d2318729f6206294fa2fa Author: eileencodes AuthorDate: 2023-12-06 04:06:01 +0900 Commit: Jemma Issroff CommitDate: 2023-12-06 23:46:19 +0900 [PRISM] Implement `PM_KEYWORD_HASH_NODE` for `defined?` Ruby code: ```ruby defined? [a: [:b, :c]] ``` Instructions (without optimizations): ``` "********* Ruby *************" == disasm: #@:0 (0,0)-(0,23)> == catch table | catch type: rescue st: 0001 ed: 0007 sp: 0000 cont: 0009 | == disasm: #@:0 (0,0)-(-1,-1)> | local table (size: 1, argc: 0 [opts: 0, rest: -1, post: 0, block: -1, kw: -1@-1, kwrest: -1]) | [ 1] "$!"@0 | 0000 putnil | 0001 leave |------------------------------------------------------------------------ 0000 putnil 0001 putobject true 0003 branchunless 9 0005 putobject "expression" 0007 swap 0008 pop 0009 leave "********* PRISM *************" == disasm: #@:0 (0,0)-(0,23)> == catch table | catch type: rescue st: 0000 ed: 0009 sp: 0000 cont: 0009 | == disasm: #@:0 (0,0)-(-1,-1)> | local table (size: 1, argc: 0 [opts: 0, rest: -1, post: 0, block: -1, kw: -1@-1, kwrest: -1]) | [ 1] "$!"@0 | 0000 putnil | 0001 leave |------------------------------------------------------------------------ 0000 putnil 0001 putobject true 0003 branchunless 9 0005 putobject "expression" 0007 swap 0008 pop 0009 leave ``` Instructions (with optimizations): ``` "********* Ruby *************" == disasm: #@:0 (0,0)-(0,23)> == catch table | catch type: rescue st: 0001 ed: 0003 sp: 0000 cont: 0005 | == disasm: #@:0 (0,0)-(-1,-1)> | local table (size: 1, argc: 0 [opts: 0, rest: -1, post: 0, block: -1, kw: -1@-1, kwrest: -1]) | [ 1] "$!"@0 | 0000 putnil | 0001 leave |------------------------------------------------------------------------ 0000 putnil 0001 putobject "expression" 0003 swap 0004 pop 0005 leave "********* PRISM *************" == disasm: #@:0 (0,0)-(0,23)> == catch table | catch type: rescue st: 0000 ed: 0005 sp: 0000 cont: 0005 | == disasm: #@:0 (0,0)-(-1,-1)> | local table (size: 1, argc: 0 [opts: 0, rest: -1, post: 0, block: -1, kw: -1@-1, kwrest: -1]) | [ 1] "$!"@0 | 0000 putnil | 0001 leave |------------------------------------------------------------------------ 0000 putnil 0001 putobject "expression" 0003 swap 0004 pop 0005 leave ``` commit 86497645229099f3a6d0f64b3bb85d215f04f5df Author: eileencodes AuthorDate: 2023-12-06 03:47:46 +0900 Commit: Jemma Issroff CommitDate: 2023-12-06 23:46:19 +0900 [PRISM] Implement `PM_SPLAT_NODE` for `defined?` In an array for `defined?` we need to check if there is a `contains_splat` flag, if so bail early. Ruby code: ```ruby defined?([[*1..2], 3, *4..5]) ``` Instructions: ``` "********* Ruby *************" == disasm: #@:0 (0,0)-(0,29)> 0000 putobject "expression" 0002 leave "********* PRISM *************" == disasm: #@:0 (0,0)-(0,29)> 0000 putobject "expression" 0002 leave ``` commit 02961fdbab0da97b2aa506b3e77d846d7e883ddc Author: eileencodes AuthorDate: 2023-12-06 02:14:41 +0900 Commit: Jemma Issroff CommitDate: 2023-12-06 23:46:19 +0900 [PRISM] Implement `PM_SOURCE_LINE_NODE` for `defined?` Ruby code: ```ruby defined?(__LINE__) ``` Instructions: ``` "********* Ruby *************" == disasm: #@:0 (0,0)-(0,18)> 0000 putobject "expression" 0002 leave "********* PRISM *************" == disasm: #@:0 (0,0)-(0,18)> 0000 putobject "expression" 0002 leave ``` commit d474239537f0845c4b737869fabe7815274500b8 Author: eileencodes AuthorDate: 2023-12-06 02:12:44 +0900 Commit: Jemma Issroff CommitDate: 2023-12-06 23:46:19 +0900 [PRISM] Implement `PM_SOURCE_FILE_NODE` for `defined?` Ruby code: ```ruby defined?(__FILE__) ``` Instructions: ``` "********* Ruby *************" == disasm: #@:0 (0,0)-(0,18)> 0000 putobject "expression" 0002 leave "********* PRISM *************" == disasm: #@:0 (0,0)-(0,18)> 0000 putobject "expression" 0002 leave ``` commit 41b117e50c97ab8117ff538d6cd8ff2ebed57c71 Author: eileencodes AuthorDate: 2023-12-06 02:07:26 +0900 Commit: Jemma Issroff CommitDate: 2023-12-06 23:46:19 +0900 [PRISM] Implement `PM_SOURCE_ENCODING_NODE` for `defined? Ruby code: ```ruby defined?(__ENCODING__) ``` Instructions: ``` "********* Ruby *************" == disasm: #@:0 (0,0)-(0,22)> 0000 putobject "expression" 0002 leave "********* PRISM *************" == disasm: #@:0 (0,0)-(0,22)> 0000 putobject "expression" 0002 leave ``` commit b04255deff8da978a967447a478be44d9c66d74e Author: eileencodes AuthorDate: 2023-12-06 02:04:56 +0900 Commit: Jemma Issroff CommitDate: 2023-12-06 23:46:19 +0900 [PRISM] Implement `PM_IMAGINARY_NODE` for `defined?` Ruby Code: ``` defined?(1i) ``` Instructions: ``` "********* Ruby *************" == disasm: #@:0 (0,0)-(0,12)> 0000 putobject "expression" 0002 leave "********* PRISM *************" == disasm: #@:0 (0,0)-(0,12)> 0000 putobject "expression" 0002 leave ``` commit d6ec1aa0a79235e75cbb92141590199a322e7bf1 Author: Matt Valentine-House AuthorDate: 2023-12-01 23:37:10 +0900 Commit: Kevin Newton CommitDate: 2023-12-06 21:02:04 +0900 [PRISM] Compile Rescue Modifier nodes commit 34543f7c75c28f8b650b5ef3c30eb2c5314c4db5 Author: Haldun Bayhantopcu AuthorDate: 2023-12-06 17:39:47 +0900 Commit: git[bot] CommitDate: 2023-12-06 20:41:49 +0900 [ruby/prism] Update snapshot https://github.com/ruby/prism/commit/5f0ea09785 commit c23c5f1ea6c4892e9d8ec2d14bf44e7e198a45da Author: Benoit Daloze AuthorDate: 2023-12-06 20:35:16 +0900 Commit: Benoit Daloze CommitDate: 2023-12-06 20:35:16 +0900 Add NEWS entry about Encoding#replicate commit ca8733daaf7be388fb492e7feddfd569856686a2 Author: Nobuyoshi Nakada AuthorDate: 2023-12-06 19:56:38 +0900 Commit: Nobuyoshi Nakada CommitDate: 2023-12-06 19:56:38 +0900 [DOC] Fixed document position Method documentation must be placed immediately before each implementation, without any other functions or preprocessor directives. commit d411d8f5fe80b9c8f741ee03f91a670d5620917c Author: Hiroshi SHIBATA AuthorDate: 2023-12-06 18:03:47 +0900 Commit: git[bot] CommitDate: 2023-12-06 19:10:44 +0900 [rubygems/rubygems] Try to load Gem::BUNDLED_GEMS on Bundler `bundle exec ruby foo.rb` ignore to load gem_prelude.rb. Because warnings feature is not working with `bundle exec ruby`. https://github.com/rubygems/rubygems/commit/a0d4ed92a7 commit e03e872eea75ee63672c755dccc340a1f6042fce Author: Nobuyoshi Nakada AuthorDate: 2023-12-06 18:09:30 +0900 Commit: git[bot] CommitDate: 2023-12-06 18:35:44 +0900 [ruby/rdoc] Only word-ending colon separates new definition When followed by non-space characters, rather it looks like a URL or a path name on Windows. https://github.com/ruby/rdoc/commit/72c6560773 commit 379f06797d563084ed28f397419f97b7d2e01d87 Author: Nobuyoshi Nakada AuthorDate: 2023-12-06 17:37:38 +0900 Commit: git[bot] CommitDate: 2023-12-06 18:35:43 +0900 [ruby/rdoc] Needs more backslash to match escaping backslashs https://github.com/ruby/rdoc/commit/1904e9076d commit 8105ff9ac4b63b7ceae5bb9bafc5c935b24a3f57 Author: Nobuyoshi Nakada AuthorDate: 2023-12-06 17:27:28 +0900 Commit: git[bot] CommitDate: 2023-12-06 18:35:43 +0900 [ruby/rdoc] Use single quotes to keep backslash literally https://github.com/ruby/rdoc/commit/4ac9be7f48 commit 1fd976db21191307fc1262631f5da20c8ce970fd Author: Yusuke Endoh AuthorDate: 2023-12-06 16:47:29 +0900 Commit: Yusuke Endoh CommitDate: 2023-12-06 17:13:18 +0900 Refine the NEWS entry for bundler warning commit 7e05e9ff945c4e6d9fffebafc8037e28d747f0b7 Author: Samuel Williams AuthorDate: 2023-12-06 15:48:55 +0900 Commit: GitHub CommitDate: 2023-12-06 15:48:55 +0900 Fix incorrect "nested_fake_name" documentation. (#9135) commit 888051802b7a0d38303c946f1349b2c0daf6239a Author: Samuel Williams AuthorDate: 2023-12-06 15:47:33 +0900 Commit: GitHub CommitDate: 2023-12-06 15:47:33 +0900 Add news for `Fiber#kill`. (#9134) commit 538ff351336ebbee6c0a7987bbbbf8d34cb67d6b Author: Jun Aruga AuthorDate: 2023-12-05 14:07:29 +0900 Commit: git[bot] CommitDate: 2023-12-06 11:49:01 +0900 [rubygems/rubygems] test_bundled_ca.rb: Add Net::OpenTimeout as a offline case. It seems that when DNS connection is enabled, but the TCP connection is disabled in a way, the `Net::HTTP.connect` raises `Net::OpenTimeout`. And I want to skip the tests in this case. https://github.com/ruby/net-http/blob/042faf74e77d786ff60dff81555f6ec4f21e77a9/lib/net/http.rb#L1601-L1608 ``` 1) Error: TestBundledCA#test_accessing_new_index: Net::OpenTimeout: execution expired /builddir/build/BUILD/ruby-3.0.4/lib/net/http.rb:987:in `initialize' /builddir/build/BUILD/ruby-3.0.4/lib/net/http.rb:987:in `open' /builddir/build/BUILD/ruby-3.0.4/lib/net/http.rb:987:in `block in connect' /builddir/build/BUILD/ruby-3.0.4/lib/timeout.rb:107:in `timeout' /builddir/build/BUILD/ruby-3.0.4/lib/net/http.rb:985:in `connect' /builddir/build/BUILD/ruby-3.0.4/lib/net/http.rb:970:in `do_start' /builddir/build/BUILD/ruby-3.0.4/lib/net/http.rb:959:in `start' /builddir/build/BUILD/ruby-3.0.4/lib/net/http.rb:1512:in `request' /builddir/build/BUILD/ruby-3.0.4/lib/net/http.rb:1270:in `get' /builddir/build/BUILD/ruby-3.0.4/test/rubygems/test_bundled_ca.rb:34:in `assert_https' /builddir/build/BUILD/ruby-3.0.4/test/rubygems/test_bundled_ca.rb:58:in `test_accessing_new_index' ... ``` https://github.com/rubygems/rubygems/commit/5defe0a2f6 commit d9a1bb4b097899c21c9a11b042072224c4ff252b Author: Martin Emde AuthorDate: 2023-12-06 06:29:37 +0900 Commit: git[bot] CommitDate: 2023-12-06 11:45:37 +0900 [rubygems/rubygems] Use String#unpack1 available since ruby 3.0 https://github.com/rubygems/rubygems/commit/46258d6cb4 commit b8b319dd1a48b695df8982eacf8b1ee0004c7a8b Author: HParker AuthorDate: 2023-12-06 09:57:29 +0900 Commit: Yusuke Endoh CommitDate: 2023-12-06 10:21:12 +0900 Revert "allow enabling Prism via flag or env var" This reverts commit 9b76c7fc89460ed8e9be40e4037c1d68395c0f6d. commit 00467699a96902bc8dc68bf0ad237f9a02e093d5 Author: Samuel Williams AuthorDate: 2023-12-06 09:42:45 +0900 Commit: GitHub CommitDate: 2023-12-06 09:42:45 +0900 Don't warn generally for `IO::Buffer`, only on specific code paths e.g. `map`. (#9131) commit 0346cbbc148a6eec2f3a5b840758b00b51b3d016 Author: Alan Wu AuthorDate: 2023-12-06 07:54:37 +0900 Commit: Alan Wu CommitDate: 2023-12-06 08:19:42 +0900 Fix parameter types for rb_ivar_foreach() callbacks For this public API, the callback is declared to take `(ID, VALUE, st_data_t)`, but it so happens that using `(st_data_t, st_data_t, st_data_t)` also type checks, because the underlying type is identical. Use it as declared and get rid of some casts. commit 56eccb350b8872b4eca051cc3e2732cefb717637 Author: Peter Zhu AuthorDate: 2023-12-06 06:25:34 +0900 Commit: Peter Zhu CommitDate: 2023-12-06 06:25:34 +0900 Fix alphabetical order of include in shape.c commit 5f0ea3f590f8983669fe478bc9eace6880353b84 Author: Martin Emde AuthorDate: 2023-12-02 07:20:51 +0900 Commit: git[bot] CommitDate: 2023-12-06 06:09:53 +0900 [rubygems/rubygems] Converts Bundler lockfile checksum validation to opt-in only Looks for the CHECKSUMS section in the lockfile, activating the feature only if the section exists. Without a CHECKSUMS section, Bundler will continue as normal, validating checksums when gems are installed while checksums from the compact index are present. https://github.com/rubygems/rubygems/commit/2353cc93a4 commit a33632e1ca7af1e3ba34cff05643aa067561a8cc Author: eileencodes AuthorDate: 2023-12-06 01:34:20 +0900 Commit: git[bot] CommitDate: 2023-12-06 05:47:22 +0900 [ruby/prism] Fix defined with new line It's possible to write the following and have it be valid Ruby: ``` defined?("foo" ) ``` But Prism wasn't taking the new line into account. This adds an `accept1` for a `PM_TOKEN_NEWLINE` to account for this. I've also updated the fixtures and snapshots to test this. https://github.com/ruby/prism/commit/b87f8eedc6 commit 82883dc8f2343913eb9df32fda6798b2f969dfee Author: Schneems AuthorDate: 2023-12-06 03:24:06 +0900 Commit: git[bot] CommitDate: 2023-12-06 03:25:42 +0900 [ruby/syntax_suggest] Change assertion to not rely on exact text from prism The original ripper test was very stable as the output didn't change. Prism is under active development and changing their output shouldn't cause a failure to the ruby/ruby test suite like https://github.com/ruby/ruby/actions/runs/7104601478/job/19339940315. This commit moves from checking exact output to asserting that the string we get back is not empty. This should give the same level of confidence that some error message was caught, and is less brittle. https://github.com/ruby/syntax_suggest/commit/4b6abb763e commit a063969ec18c8f213d9c70471a29d0d31ec5850a Author: Alan Wu AuthorDate: 2023-12-06 01:40:17 +0900 Commit: Alan Wu CommitDate: 2023-12-06 03:20:06 +0900 YJIT: Assert code pages are not partially in-bounds Helps understand page switching commit 695e5c179ed06761e47c700c6b31a26f48eee699 Author: Alan Wu AuthorDate: 2023-12-06 00:22:46 +0900 Commit: Alan Wu CommitDate: 2023-12-06 03:20:06 +0900 YJIT: Simplify code page switching logic, remove an assert We have received a report of `assert!( !cb.has_dropped_bytes())` in set_page() failing. The only explanation for this seems to be memory allocation failing in write_byte(). The if condition implies that `current_write_pos < dst_pos < mem_size`, which rules out failing to encode the relative jump. The has_capacity() assert above not tripping implies that we were in a place in the page where write_byte() did attempt to write the byte and potentially made a syscall in the process. Remove the assert, since memory allocation could fail. Also, return failure if the destination is outside of the code region to detect that out-of-memory situation quicker. commit c175e265dae7c7192f9cf4ecbbc1c29c0491ef16 Author: Schneems AuthorDate: 2023-12-05 08:34:12 +0900 Commit: git[bot] CommitDate: 2023-12-06 02:51:29 +0900 [ruby/syntax_suggest] Remove duplicate error messages Before: ``` Expected a newline or semicolon after the statement Cannot parse the expression Expected a newline or semicolon after the statement Cannot parse the expression 1 describe "webmock tests" do 22 it "body" do 27 query = Cutlass::FunctionQuery.new( > 28 port: port > 29 body: body 30 ).call 34 end 35 end ``` After: ``` Expected a newline or semicolon after the statement Cannot parse the expression 1 describe "webmock tests" do 22 it "body" do 27 query = Cutlass::FunctionQuery.new( > 28 port: port > 29 body: body 30 ).call 34 end 35 end ``` https://github.com/ruby/syntax_suggest/commit/becf097e5e commit 6d39d6d2143f7b910f310de0ff92772839ac72a2 Author: Schneems AuthorDate: 2023-12-05 07:59:10 +0900 Commit: git[bot] CommitDate: 2023-12-06 02:51:29 +0900 [ruby/syntax_suggest] Update docs, clean up PR Removes or updates mentions of Ripper https://github.com/ruby/syntax_suggest/commit/08aaa3f50a commit 62c96959114ea165f7434da9edc42d15e4aaebfa Author: Schneems AuthorDate: 2023-12-05 06:23:41 +0900 Commit: git[bot] CommitDate: 2023-12-06 02:51:28 +0900 [ruby/syntax_suggest] Support lexing with Prism https://github.com/ruby/syntax_suggest/commit/7f4176a914 commit cce29750d797a85ac89540b9ad47816131652a2f Author: Schneems AuthorDate: 2023-12-02 03:14:06 +0900 Commit: git[bot] CommitDate: 2023-12-06 02:51:27 +0900 [ruby/syntax_suggest] Initial support for the prism parser Prism will be the parser in Ruby 3.3. We need to support 3.0+ so we will have to "dual boot" both parsers. Todo: - LexAll to support Prism lex output - Add tests that exercise both Ripper and prism codepaths on CI - Handle https://github.com/ruby/prism/issues/1972 in `ripper_errors.rb` - Update docs to not mention Ripper explicitly - Consider different/cleaner APIs for separating out Ripper and Prism https://github.com/ruby/syntax_suggest/commit/a7d6991cc4 commit 9b76c7fc89460ed8e9be40e4037c1d68395c0f6d Author: HParker AuthorDate: 2023-12-02 06:25:41 +0900 Commit: Jemma Issroff CommitDate: 2023-12-06 02:17:14 +0900 allow enabling Prism via flag or env var Enable Prism using either --prism ruby --prism test.rb or via env var RUBY_PRISM=1 ruby test.rb commit b29ed638833f2abc7ce99b5bbf5cd07b0021d7fe Author: Stan Lo AuthorDate: 2023-12-06 01:34:15 +0900 Commit: git[bot] CommitDate: 2023-12-06 01:34:19 +0900 [ruby/irb] Bump version to v1.10.1 (https://github.com/ruby/irb/pull/801) https://github.com/ruby/irb/commit/a1e431bd83 commit f55746a93d48a3ee1fdfacba3716457fabea150a Author: Stan Lo AuthorDate: 2023-12-06 01:32:09 +0900 Commit: git[bot] CommitDate: 2023-12-06 01:32:13 +0900 [ruby/irb] Disable pager when TERM is not set too (https://github.com/ruby/irb/pull/802) https://github.com/ruby/irb/commit/173980974b commit ef387e67307504f41baf45a5b06a10eb82933788 Author: Stan Lo AuthorDate: 2023-12-06 01:03:01 +0900 Commit: git[bot] CommitDate: 2023-12-06 01:03:06 +0900 [ruby/irb] Pager should be disabled when TERM=dumb (https://github.com/ruby/irb/pull/800) For apps/libs that test against IRB, it's recommended to set `TERM=dumb` so they get minimum disruption from Reline's interactive-focus features. Therefore, we should follow the convention to disable pager when `TERM=dumb`. https://github.com/ruby/irb/commit/8a3002a39e commit 94bf9f80377d32e9dd5123bdf487b55b5e06a851 Author: Haldun Bayhantopcu AuthorDate: 2023-12-05 18:17:50 +0900 Commit: git[bot] CommitDate: 2023-12-06 00:25:20 +0900 [ruby/prism] Remove unnecessary match https://github.com/ruby/prism/commit/694d3d7279 commit ff6706b08e445c2927351da307e0d53e48f9332e Author: TSUYUSATO Kitsune AuthorDate: 2023-12-02 12:11:00 +0900 Commit: git[bot] CommitDate: 2023-12-06 00:16:42 +0900 [ruby/prism] Fix a typo https://github.com/ruby/prism/pull/1949#discussion_r1412568793 https://github.com/ruby/prism/commit/a00f21d10a commit 3260ed7e5eeb7313411a682d9734f48920be9691 Author: TSUYUSATO Kitsune AuthorDate: 2023-12-01 02:28:10 +0900 Commit: git[bot] CommitDate: 2023-12-06 00:16:42 +0900 [ruby/prism] Add test cases https://github.com/ruby/prism/commit/e91f8dbb99 commit 975b74a8eb042c642e626fa95af7c15d41121497 Author: TSUYUSATO Kitsune AuthorDate: 2023-12-01 02:22:43 +0900 Commit: git[bot] CommitDate: 2023-12-06 00:16:41 +0900 [ruby/prism] Fix argument order https://github.com/ruby/prism/pull/1949#discussion_r1410733341 https://github.com/ruby/prism/commit/27635da821 Co-Authored-By: Kevin Newton commit 3d4a4b252917ef2a76c92333eaeb76448b56d7ba Author: TSUYUSATO Kitsune AuthorDate: 2023-11-30 18:25:26 +0900 Commit: git[bot] CommitDate: 2023-12-06 00:16:41 +0900 [ruby/prism] Fix some corner cases https://github.com/ruby/prism/commit/d5453f168e commit dcd75fd49dd879f4931b1c5b1bd65990a92badb5 Author: TSUYUSATO Kitsune AuthorDate: 2023-11-30 17:42:35 +0900 Commit: git[bot] CommitDate: 2023-12-06 00:16:40 +0900 [ruby/prism] Fix to parse command-style method calls more correctly Fix https://github.com/ruby/prism/pull/1468 Fix https://github.com/ruby/prism/pull/1575 To decide command-style method calls are allowed, this introduce a new parameter `accepts_command_call` to `parse_expression` and some functions. Although one think this can be solved by operator precedence, it is hard or impossible, because the precedence of command-style calls is skewed (e.g. `! bar 1 ` is accepted, but `foo = ! bar 1` is rejected.) One of the most complex examples is that: (1) even though `foo = bar = baz 1` and `foo, bar = baz 1` is accepted, (2) `foo, bar = baz = fuzz 1` is rejected. To implement this behavior, this introduces a new binding power `PM_BINDING_POWER_MULTI_ASSIGNMENT` and uses it for distinguish which single assignments or multi assignments at their RHS. https://github.com/ruby/prism/commit/d4dd49ca81 commit 6b9622ebdfc5ef12ee379cd1f0818b0188e1e068 Author: Matt Valentine-House AuthorDate: 2023-12-04 21:27:34 +0900 Commit: Jemma Issroff CommitDate: 2023-12-05 22:56:22 +0900 [PRISM] Implement Retry node. commit 674eb7df7f409099f33da77293d9658e09b470d6 Author: Peter Zhu AuthorDate: 2023-12-05 04:02:56 +0900 Commit: Peter Zhu CommitDate: 2023-12-05 22:42:25 +0900 Make env_copy compaction safe The original order of events is: 1. Allocate env_body. 2. Fill env_body using elements in src_env, and it performs operations that can trigger a GC. 3. Create the copied_env using vm_env_new. However, if GC compaction runs during step 2, then copied_env would not have yet been created and objects on env_body could move but it would not be reference updated. This commit changes the the order to be (1), (3), (2). commit ed25f0bd5a4fb936eddde080b90446e7d55afb2d Author: Peter Zhu AuthorDate: 2023-12-05 04:00:00 +0900 Commit: Peter Zhu CommitDate: 2023-12-05 22:42:25 +0900 Make env_clone compaction safe The original order of events is: 1. Allocate new_body. 2. Peform memcpy into new_body. 3. Create new_env using new_body. However, if GC compaction runs during step 3, then new_env would not have yet been created and objects on new_body could move but it would not be reference updated. This commit changes the order of the last two events. commit bf0c8055ab29a9c2d8280028379c4a7cb033905e Author: Nobuyoshi Nakada AuthorDate: 2023-12-05 18:10:56 +0900 Commit: Nobuyoshi Nakada CommitDate: 2023-12-05 18:10:56 +0900 [DOC] Fix wording in descriptions of Time-like objects Co-authored-by: Burdette Lamar commit bf0f56e12432be8f2047a5330d4bc0bfff6243f5 Author: Nobuyoshi Nakada AuthorDate: 2023-12-02 23:55:26 +0900 Commit: Nobuyoshi Nakada CommitDate: 2023-12-05 18:04:02 +0900 [DOC] Mention Time-like objects commit 113f5d7fd79f2b7dd72a2f748dee475ad793a743 Author: Nobuyoshi Nakada AuthorDate: 2023-12-05 13:22:27 +0900 Commit: git[bot] CommitDate: 2023-12-05 17:48:19 +0900 [ruby/rdoc] Allow any single-word token upto 2 before C method implementation Previously only unknown word `intern` is allowed between a single-word token before a C method. Now any single-word token, such as `inline` which is used for `ArithmeticSequence` in enumerator.c, is allowed instead. https://github.com/ruby/rdoc/commit/3a214c1dd1 commit c0baa3783f1f43072128cb90339a2d00e03dde1c Author: Nobuyoshi Nakada AuthorDate: 2023-12-05 13:22:07 +0900 Commit: git[bot] CommitDate: 2023-12-05 17:48:18 +0900 [ruby/rdoc] Reduce matched substring allocations https://github.com/ruby/rdoc/commit/aaed688a97 commit d691b1a14167129cc415abda3792aa25fd5d6a96 Author: Hiroshi SHIBATA AuthorDate: 2023-12-05 16:36:51 +0900 Commit: git[bot] CommitDate: 2023-12-05 16:37:08 +0900 [ruby/rdoc] Bump up 6.6.1 https://github.com/ruby/rdoc/commit/7cf353a696 commit f19de1289b4c20b12efe431d124f6988fbaf007f Author: Hiroshi SHIBATA AuthorDate: 2023-12-05 16:02:01 +0900 Commit: git[bot] CommitDate: 2023-12-05 16:02:17 +0900 [ruby/tempfile] Bump up 0.2.1 https://github.com/ruby/tempfile/commit/1450bb4f1c commit 494e2e4bfb28349a19b4503e37ac11509de1d50e Author: Akshay Birajdar AuthorDate: 2023-05-01 19:32:38 +0900 Commit: git[bot] CommitDate: 2023-12-05 15:43:42 +0900 [ruby/tempfile] Alias #to_s to #inspect https://github.com/ruby/tempfile/commit/e515889412 commit e7cc79183879b6449d42050407b3e998428b4ef2 Author: Hiroshi SHIBATA AuthorDate: 2023-12-05 15:35:26 +0900 Commit: git[bot] CommitDate: 2023-12-05 15:38:55 +0900 [ruby/cgi] Bump up 0.4.1 https://github.com/ruby/cgi/commit/929e6264b5 commit 56ccad060d1c215280f12444f726d54d2ca6636d Author: Toshimaru AuthorDate: 2023-11-28 09:44:05 +0900 Commit: git[bot] CommitDate: 2023-12-05 15:21:52 +0900 [ruby/rdoc] Early return when `token_stream` is `nil` https://github.com/ruby/rdoc/commit/04f75d8516 Co-authored-by: Nobuyoshi Nakada commit cda431f5388e8359532998c7fbf5fa615ce6d45e Author: toshimaru AuthorDate: 2023-11-20 08:47:52 +0900 Commit: git[bot] CommitDate: 2023-12-05 15:21:51 +0900 [ruby/rdoc] fix: fix `NoMethodError` when `token_stream` is nil The change in #1055 might be a breaking change. So, just simply wrap `token_stream` with `Array` https://github.com/ruby/rdoc/commit/d8c19d7fa1 Co-authored-by: Jonathan Hefner commit eecae51502215ae4dab9d99a1079636f3fcd99a5 Author: Hiroshi SHIBATA AuthorDate: 2023-12-05 13:01:26 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-05 15:09:56 +0900 [flori/json] Bump up 2.7.1 https://github.com/flori/json/commit/a1af7a308c commit 16669cd6ad737a99782655084fabf444f7dc93eb Author: David Rodríguez AuthorDate: 2023-12-02 00:56:17 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-05 14:28:42 +0900 [rubygems/rubygems] Fix crash when duplicating a dev dependency in Gemfile & gemspec https://github.com/rubygems/rubygems/commit/e78c0a4a48 commit 7ab877761e0577b1cd29811173971305bfadcead Author: David Rodríguez AuthorDate: 2023-10-27 01:17:22 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-05 14:28:41 +0900 [rubygems/rubygems] Instead of checking writability, try to write Checking writability is prone to errors. For example: $ mkdir -p foo/bar $ chmod -w foo $ touch foo/bar/baz # succeeds even if foo is not writable https://github.com/rubygems/rubygems/commit/6056138b6a commit 4a71852f757d9c18c023f3f6e993cdf55f74411d Author: David Rodríguez AuthorDate: 2023-10-27 00:54:28 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-05 14:28:40 +0900 [rubygems/rubygems] Set specs as pending at the beginning And word them consistently with other specs. https://github.com/rubygems/rubygems/commit/eee7afefd3 commit a60718d107d161071f0732d64898e3922d1e3b89 Author: David Rodríguez AuthorDate: 2023-10-27 00:39:05 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-05 14:28:40 +0900 [rubygems/rubygems] Simplify `--no-user-install` spec This spec is ignoring the local `.gem` file, so most stuff is not needed. https://github.com/rubygems/rubygems/commit/d52526800f commit 57178a9720ebe5c86e2fbd7d41d9f58f049133c3 Author: Mau Magnaguagno AuthorDate: 2023-11-30 12:36:59 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-05 14:28:39 +0900 [rubygems/rubygems] Prefer String#split with block in Gem::YAMLSerializer#load String#split supports a block since Ruby 2.6, avoiding intermediate array. https://github.com/rubygems/rubygems/commit/69cdf9e9d4 commit 5f789350dceef80494e4e3e3e1ce95f886657845 Author: Mau Magnaguagno AuthorDate: 2023-11-30 12:24:44 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-05 14:28:39 +0900 [rubygems/rubygems] Prefer String#split with block in Bundler::CompactIndexClient::Cache#versions String#split supports a block since Ruby 2.6, avoiding intermediate array. https://github.com/rubygems/rubygems/commit/4e864a8f2e commit a3cd7b3e27506f0b60a05292db8a18de520c69a6 Author: Mau Magnaguagno AuthorDate: 2023-11-30 12:22:11 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-05 14:28:38 +0900 [rubygems/rubygems] Prefer String#split with block in Bundler::YAMLSerializer#load String#split supports a block since Ruby 2.6, avoiding intermediate array. https://github.com/rubygems/rubygems/commit/5b324969cd commit 440ea778f2b8422e07075e5c451ec0d3bad8f90d Author: Hiroshi SHIBATA AuthorDate: 2023-12-05 14:27:19 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-05 14:27:19 +0900 VERSION file of JSON is removed from upstream commit a399c1f26d34b2ba3a4787f2206c59faa2ea97da Author: Hiroshi SHIBATA AuthorDate: 2023-12-05 11:23:47 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-05 12:04:35 +0900 Removed obsoleted version definition commit bf5368493b74d514328f0f1096f760fca1d0c56c Author: Hiroshi SHIBATA AuthorDate: 2023-12-05 11:23:24 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-05 12:04:11 +0900 [flori/json] Detect json version from version.rb https://github.com/flori/json/commit/3ef57b5b39 commit 84654bfbba8df0f9eb6876051f8fe62f9a423bdd Author: Hiroshi SHIBATA AuthorDate: 2023-12-05 10:41:16 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-05 12:04:11 +0900 [flori/json] cosmetics https://github.com/flori/json/commit/39d6c854a4 commit abc3d124f79abae6ea9072fe6a3e70486c1fbe58 Author: Hiroshi SHIBATA AuthorDate: 2023-12-05 10:41:01 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-05 12:04:10 +0900 [flori/json] The modern Ruby uses utf-8 encodings by default https://github.com/flori/json/commit/11b31210ac commit c8faaf4c7edf67a19786cb9ba53805e5b813b918 Author: Burdette Lamar AuthorDate: 2023-12-05 09:59:48 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-05 12:04:09 +0900 [flori/json] [DOC] RDoc for additions (https://github.com/flori/json/pull/557) * RDoc for additions * Update lib/json/add/time.rb Co-authored-by: Hiroshi SHIBATA --------- https://github.com/flori/json/commit/3f2efd60f7 Co-authored-by: Hiroshi SHIBATA commit 70740deea793274f6e38a7b7fc3688aa709fd1d8 Author: tompng AuthorDate: 2023-12-04 19:18:14 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-05 12:04:08 +0900 [flori/json] Fix JSON.dump overload combination https://github.com/flori/json/commit/41c2712a3b commit e6b35e8a6d70892037503d74cec2657b2b8bd116 Author: Takashi Kokubun AuthorDate: 2023-12-02 02:53:44 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-05 12:04:08 +0900 [flori/json] Overload kwargs in JSON.dump https://github.com/flori/json/commit/936f280f9f commit a22ed8943859963c67533bb0edc13a27bfdac00c Author: Jean Boussier AuthorDate: 2023-12-01 19:46:16 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-05 12:04:07 +0900 [flori/json] JSON.dump: handle unenclosed hashes regression Fix: https://github.com/flori/json/issues/553 We can never add keyword arguments to `dump` otherwise existing code using unenclosed hash will break. https://github.com/flori/json/commit/8e0076a3f2 commit 5a2d70ef73d4d17f5999f5087499a5eda1126567 Author: Schneems AuthorDate: 2023-12-05 07:19:20 +0900 Commit: git[bot] CommitDate: 2023-12-05 07:29:44 +0900 [ruby/syntax_suggest] Bump minimum Ruby version & update standardrb https://github.com/ruby/syntax_suggest/commit/73753518e9 commit 13482ab1e61e0c337badd6308412621f807df9c1 Author: Schneems AuthorDate: 2023-12-05 07:17:19 +0900 Commit: git[bot] CommitDate: 2023-12-05 07:18:40 +0900 [ruby/syntax_suggest] Update standardrb to Ruby 3.0 standards https://github.com/ruby/syntax_suggest/commit/2771dcabe0 commit 81a700853d1d3bdf7973c7d7175711e7e8c508c7 Author: Jemma Issroff AuthorDate: 2023-12-05 00:55:11 +0900 Commit: Jemma Issroff CommitDate: 2023-12-05 07:02:04 +0900 [PRISM] Fixed redo node commit 7d371ca25d8e8f6524894be4413484cc9b04cb72 Author: eileencodes AuthorDate: 2023-12-05 05:40:43 +0900 Commit: Jemma Issroff CommitDate: 2023-12-05 06:45:18 +0900 [PRISM] Handle percent literals for `defined?` Tests all the possible percent literal with `defined?`. Implements the missing `PM_X_STRING_NODE` for the `%x` literal. Code: ```ruby defined?(%x[1,2,3]) ``` ``` "********* Ruby *************" == disasm: #@:0 (0,0)-(0,19)> 0000 putobject "expression" 0002 leave "********* PRISM *************" == disasm: #@:0 (0,0)-(0,19)> 0000 putobject "expression" 0002 leave ``` commit 09e8d37f5b60f1cd1076c354128309cdf74d0df7 Author: eileencodes AuthorDate: 2023-12-05 05:22:10 +0900 Commit: Jemma Issroff CommitDate: 2023-12-05 06:45:18 +0900 [PRISM] Implement `PM_INTERPOLATED_REGULAR_EXPRESSION_NODE` Implements `PM_INTERPOLATED_REGULAR_EXPRESSION_NODE` for `defined?` Code: ```ruby defined?(/#{1}/) ``` ``` "********* Ruby *************" == disasm: #@:0 (0,0)-(0,16)> 0000 putobject "expression" 0002 leave "********* PRISM *************" == disasm: #@:0 (0,0)-(0,16)> 0000 putobject "expression" 0002 leave ``` commit 33bc22efe5d372898f3a37004f324f7457e9a944 Author: eileencodes AuthorDate: 2023-12-05 05:10:12 +0900 Commit: Jemma Issroff CommitDate: 2023-12-05 06:45:18 +0900 [PRISM] Implement `PM_INTERPOLATED_STRING_NODE` Implements `PM_INTERPOLATED_STRING_NODE` for `defined?` Code: ```ruby defined?("#{expr}") ``` ``` "********* Ruby *************" == disasm: #@:0 (0,0)-(0,19)> 0000 putobject "expression" 0002 leave "********* PRISM *************" == disasm: #@:0 (0,0)-(0,19)> 0000 putobject "expression" 0002 leave ``` commit c23b2e5353f08a7131c77567f89d3aae707bdd25 Author: eileencodes AuthorDate: 2023-12-05 05:01:51 +0900 Commit: Jemma Issroff CommitDate: 2023-12-05 06:45:18 +0900 [PRISM] Fix `PM_PARENTHESES_NODE` In #9101 I only accounted for an empty paren. This change implements the `PM_PARENTHESES_NODE` for when it's `nil` and when it's an expression. Code: ```ruby defined?(("a")) ``` ``` "********* Ruby *************" == disasm: #@:0 (0,0)-(0,15)> 0000 putobject "expression" 0002 leave "********* PRISM *************" == disasm: #@:0 (0,0)-(0,15)> 0000 putobject "expression" 0002 leave ``` commit 569750f624dbb4e9d5836d4e9c46816224f4b681 Author: eileencodes AuthorDate: 2023-12-05 01:45:42 +0900 Commit: Aaron Patterson CommitDate: 2023-12-05 05:03:22 +0900 [Prism] Implement backref and numbered reference for `defined?` This PR implements `PM_BACK_REFERENCE_READ_NODE` and `PM_NUMBERED_REFERENCE_READ_NODE` for `defined?`. The following now works: * `PM_NUMBERED_REFERENCE_READ_NODE` ``` defined? $1 defined? $2 ``` Instructions: ``` "********* RUBY *************" == disasm: #@:0 (0,0)-(0,12)> 0000 putnil 0001 defined ref, :$1, "global-variable" 0005 leave "********* PRISM *************" == disasm: #@:0 (0,0)-(0,12)> 0000 putnil 0001 defined ref, :$1, "global-variable" 0005 leave ``` * `PM_BACK_REFERENCE_READ_NODE` ``` defined? $' defined? $` defined? $& ``` Instructions: ``` "********* RUBY *************" == disasm: #@:0 (0,0)-(0,12)> 0000 putnil 0001 defined ref, :$`, "global-variable" 0005 leave "********* PRISM *************" == disasm: #@:0 (0,0)-(0,12)> 0000 putnil 0001 defined ref, :$`, "global-variable" 0005 leave ``` commit e3ca50b02fc4e3381f62a60bce0164d2132cf4ed Author: Jemma Issroff AuthorDate: 2023-12-05 01:36:35 +0900 Commit: Jemma Issroff CommitDate: 2023-12-05 04:03:00 +0900 [PRISM] Fix compilation for NextNode This code was almost enitrely the same as the existing compiler's code for its NextNode. commit 71babe5536bdb2238509752d8706194ee57ff485 Author: Peter Zhu AuthorDate: 2023-12-04 23:26:26 +0900 Commit: Peter Zhu CommitDate: 2023-12-05 03:57:12 +0900 Use 32-bit integers for redblack_id_t On 32-bit systems, the shape cache size is 1048576 (value of REDBLACK_CACHE_SIZE), but a 16-bit unsigned integer can only go up to 65536. This means that the redblack_id_t can overflow and lead to a corrupted red-black tree. The following script crashes on 32-bit systems: o = Object.new 1_000_000.times do |i| o.instance_variable_set(:"@i#{i}", i) end commit d35aa58b2fac5ce0172c3a940a9b5f33af21bc56 Author: Kevin Newton AuthorDate: 2023-12-05 02:15:13 +0900 Commit: git[bot] CommitDate: 2023-12-05 02:15:19 +0900 [ruby/prism] Fix up docs for lex_compat https://github.com/ruby/prism/commit/9131e84060 commit ea9f89eeb68dd7cac0083c1cfc5300672b380d00 Author: Kevin Newton AuthorDate: 2023-12-05 01:58:43 +0900 Commit: git[bot] CommitDate: 2023-12-05 02:00:14 +0900 [ruby/prism] Ripper compat docs update https://github.com/ruby/prism/commit/5f70b32b02 commit b9f2c67106ac8277b0e83a5701a43d016d829131 Author: Peter Zhu AuthorDate: 2023-12-05 00:03:45 +0900 Commit: Peter Zhu CommitDate: 2023-12-05 00:27:26 +0900 [PRISM] Fix dependencies commit b5a62eb9abf7a69e6a7288eba880652d7cd075a4 Author: Alan Wu AuthorDate: 2023-12-05 00:13:40 +0900 Commit: GitHub CommitDate: 2023-12-05 00:13:40 +0900 YJIT: Mark and update stubs in invalidated blocks (#9104) Like in the example given in delayed_deallocation(), stubs can be hit even if the block housing it is invalidated. Mark them so we don't work with invalidate ISeqs when hitting these stubs. commit f40727f4aa32dd89cffc0474c7b8dac367e6b308 Author: Peter Zhu AuthorDate: 2023-12-04 23:58:41 +0900 Commit: Peter Zhu CommitDate: 2023-12-04 23:58:41 +0900 Make rb_obj_copy_ivs_to_hash_table_i static commit 1227b6d9129d7e978b6bb659c9cb320d47a2aac1 Author: Lily Lyons AuthorDate: 2023-12-02 06:00:56 +0900 Commit: git[bot] CommitDate: 2023-12-04 23:33:44 +0900 [ruby/prism] Refactor pm_diagnostic_t and pm_comment_t to use pm_location_t https://github.com/ruby/prism/commit/115b6a2fc6 commit 2a65d8370702b3f2a5db21b65f21ccef6f0b503b Author: TSUYUSATO Kitsune AuthorDate: 2023-12-04 13:00:41 +0900 Commit: git[bot] CommitDate: 2023-12-04 23:00:23 +0900 [ruby/prism] Check "void value expression" for array literals Fix https://github.com/ruby/prism/pull/1978 https://github.com/ruby/prism/commit/194c997d0a commit 85bc80a51be0ceedcc57e7b6b779e6f8f885859e Author: John Hawthorn AuthorDate: 2023-12-04 11:13:25 +0900 Commit: John Hawthorn CommitDate: 2023-12-04 11:37:06 +0900 Revert "Add missing GVL hooks for M:N threads and ractors" This reverts commit ad54fbf281ca1935e79f4df1460b0106ba76761e. commit 9c5e1b71891dab66544de2fe3311c45ede014fdd Author: Nobuyoshi Nakada AuthorDate: 2023-12-04 10:39:17 +0900 Commit: Nobuyoshi Nakada CommitDate: 2023-12-04 10:39:17 +0900 Fix format specifiers for `size_t` commit 2e8a4470aef1c2061e781a915b485107df421e69 Author: Nobuyoshi Nakada AuthorDate: 2023-12-04 10:32:21 +0900 Commit: Nobuyoshi Nakada CommitDate: 2023-12-04 10:32:21 +0900 Remove `rb_libruby_selfpath` for MJIT commit 52eabf2e329485088672beefe4bc59c148ed20cc Author: Stan Lo AuthorDate: 2023-12-04 02:06:38 +0900 Commit: git[bot] CommitDate: 2023-12-04 02:06:41 +0900 [ruby/irb] Bump version to v1.10.0 (https://github.com/ruby/irb/pull/798) https://github.com/ruby/irb/commit/4acc9b8d6c commit a2197466a273928f76e00e89b3a6f5fb23569fa6 Author: tomoya ishida AuthorDate: 2023-12-03 23:05:13 +0900 Commit: git[bot] CommitDate: 2023-12-03 23:05:16 +0900 [ruby/irb] Disable pager in eval_history test (https://github.com/ruby/irb/pull/799) https://github.com/ruby/irb/commit/ee85e84935 commit d4b1f56f50903403cb75451215298ceb56f2302c Author: jinroq <2787780+jinroq@users.noreply.github.com> AuthorDate: 2023-12-03 06:17:53 +0900 Commit: GitHub CommitDate: 2023-12-03 06:17:53 +0900 [Fix] Support when nil is assigned to variable `name` (#9105) * Add `!name.nil?` to if condition commit ad54fbf281ca1935e79f4df1460b0106ba76761e Author: John Hawthorn AuthorDate: 2023-11-30 08:54:32 +0900 Commit: John Hawthorn CommitDate: 2023-12-03 03:06:07 +0900 Add missing GVL hooks for M:N threads and ractors [Bug #20019] This fixes GVL instrumentation in three locations it was missing: - Suspending when blocking on a Ractor - Suspending when doing a coroutine transfer from an M:N thread - Resuming after an M:N thread starts Co-authored-by: Matthew Draper commit 715cf9b6902b0cc317fbc5cea0df153e14ff7277 Author: Burdette Lamar AuthorDate: 2023-12-03 02:46:57 +0900 Commit: GitHub CommitDate: 2023-12-03 02:46:57 +0900 [DOC] More on What's Here (#9099) * More on What's Here * More on What's Here commit d1691617d6d6a115db52e7861f584fe98039ed1b Author: Peter Zhu AuthorDate: 2023-12-02 06:10:11 +0900 Commit: Peter Zhu CommitDate: 2023-12-02 23:06:03 +0900 Pin instruction storage The operands in each instruction needs to be pinned because if auto-compaction runs in iseq_set_sequence, then the objects could exist on the generated_iseq buffer, which would not be reference updated which can lead to T_MOVED (and subsequently T_NONE) objects on the iseq. commit 092a17e7bd97525904c2874228a7febcaea74bf7 Author: Nobuyoshi Nakada AuthorDate: 2023-11-26 19:33:48 +0900 Commit: Nobuyoshi Nakada CommitDate: 2023-12-02 21:48:00 +0900 [DOC] Markup class name `Time` as code commit ae3e9f114c540e78f1166f67dfb3577966f21f7f Author: Nobuyoshi Nakada AuthorDate: 2023-11-26 19:29:17 +0900 Commit: Nobuyoshi Nakada CommitDate: 2023-12-02 21:46:52 +0900 [DOC] Include timezones document in timev.rb So that it can be referred as a part of the document of `Time`. commit c9c1670f7e7aaa17e69fd14d573f2f40ccd8a3da Author: Nobuyoshi Nakada AuthorDate: 2023-12-02 21:24:11 +0900 Commit: git[bot] CommitDate: 2023-12-02 21:40:12 +0900 [ruby/rdoc] Markup punctuations need to be separated with a space https://github.com/ruby/rdoc/commit/83f0149fc1 commit 4ee1f0fb5de08acd659ec18409fca433d1bf371a Author: Gary Tou AuthorDate: 2023-12-02 13:32:00 +0900 Commit: git[bot] CommitDate: 2023-12-02 13:32:04 +0900 [ruby/irb] Implement `history` command (https://github.com/ruby/irb/pull/761) * Implement `history` command Lists IRB input history with indices. Also aliased as `hist`. * Add tests for `history` command * Address feedback: `puts` with multiple arguments instead of `join`ing * Address feedback: Handle nil from splitting an empty input string * Refactor line truncation * Add `-g` grep option to `history` command * Add `history` command to README * Remove unused `*args` parameter * Allow spaces to be included in grep * Allow `/` to be included in grep regex * Handle `input` being an empty string * Exclude "#{index}: " from matching the grep regex * Add new line after joining https://github.com/ruby/irb/commit/3f9eacbfa9 commit 9f6c6f88c3b135a41efc3e76c4b3c012141ef8b1 Author: yui-knk AuthorDate: 2023-12-01 18:02:56 +0900 Commit: yui-knk CommitDate: 2023-12-02 08:58:32 +0900 Lrama v0.5.11 commit 818813c2bde674f85804891df380c271637c0c8e Author: eileencodes AuthorDate: 2023-12-02 04:52:38 +0900 Commit: Aaron Patterson CommitDate: 2023-12-02 07:56:25 +0900 Implement paren node for `defined?` Implements and adds a test for passing a parentheses node to `defined?`. commit 6ecc1ca9b1afc5e863f82db3bb23a1ef59469817 Author: Ryan Davis AuthorDate: 2023-12-02 07:51:08 +0900 Commit: GitHub CommitDate: 2023-12-02 07:51:08 +0900 [DOC] Update ARGF.readlines documentation to match/reference IO.readlines. commit 0aed37b973c66e9ff071a1f46944cb0c6151d2dc Author: Peter Zhu AuthorDate: 2023-12-01 00:51:51 +0900 Commit: Peter Zhu CommitDate: 2023-12-02 07:13:56 +0900 Make expandarray compaction safe The expandarray instruction can allocate an array, which can trigger a GC compaction. However, since it does not increment the sp until the end of the instruction, the objects it places on the stack are not marked or reference updated by the GC, which can cause the objects to move which leaves broken or incorrect objects on the stack. This commit changes the instruction to be handles_sp so the sp is incremented inside of the instruction right after the object is written on the stack. commit 492c82cb417a92d1941f10b52e77ec0c4b2cc8a6 Author: Kevin Newton AuthorDate: 2023-12-02 02:22:01 +0900 Commit: git[bot] CommitDate: 2023-12-02 05:53:34 +0900 [ruby/prism] Prism.parse_success?(source) A lot of tools use Ripper/RubyVM::AbstractSyntaxTree to determine if a source is valid. These tools both create an AST instead of providing an API that will return a boolean only. This new API only creates the C structs, but doesn't bother reifying them into Ruby/the serialization API. Instead it only returns true/false, which is significantly more efficient. https://github.com/ruby/prism/commit/7014740118 commit b77551adee831302f22dc7d9fdccd597923511c4 Author: Peter Zhu AuthorDate: 2023-12-02 05:21:01 +0900 Commit: Peter Zhu CommitDate: 2023-12-02 05:21:01 +0900 Remove unneeded local variables commit 562d949e022cb3e7288256af8d0df3f4e17b66cb Author: Haldun Bayhantopcu AuthorDate: 2023-12-02 03:59:50 +0900 Commit: git[bot] CommitDate: 2023-12-02 05:10:58 +0900 [ruby/prism] Fix parsing heredoc ends https://github.com/ruby/prism/commit/aa8c702271 commit 39238888bc784eb5887d899dc09fad30997464ac Author: eileencodes AuthorDate: 2023-12-02 04:28:54 +0900 Commit: Aaron Patterson CommitDate: 2023-12-02 05:05:22 +0900 Implements missing literals for `defined?` This PR implements the following literals: - String - Symbols - Integers - Floats - Regexs - Ranges - Lambdas - Hashes and tests for them. commit ee0eca191f3ca486b6056234add436a8c1488dba Author: Peter Zhu AuthorDate: 2023-12-01 04:48:26 +0900 Commit: Peter Zhu CommitDate: 2023-12-02 05:04:31 +0900 Make String#undump compaction safe commit 80ea7fbad871b2222b16af1bd9f39e1f1828bbd4 Author: Peter Zhu AuthorDate: 2023-12-01 04:47:09 +0900 Commit: Peter Zhu CommitDate: 2023-12-02 05:04:31 +0900 Pin embedded shared strings Embedded shared strings cannot be moved because strings point into the slot of the shared string. There may be code using the RSTRING_PTR on the stack, which would pin the string but not pin the shared string, causing it to move. commit 0ed55bf09713299201caec3ba9d9ef7ba6e8526f Author: Samuel Giddins AuthorDate: 2023-11-28 07:06:27 +0900 Commit: git[bot] CommitDate: 2023-12-02 04:50:03 +0900 [rubygems/rubygems] Reduce array allocations when loading definition The same array was being re-created in a loop (as well as the `generic_local_platform`), which is avoidable by hoisting it to a frozen array created once https://github.com/rubygems/rubygems/commit/009a3c6d0d commit a607d62d8c5786087916413c369dbde0c62db573 Author: Nobuyoshi Nakada AuthorDate: 2023-12-02 02:29:36 +0900 Commit: Nobuyoshi Nakada CommitDate: 2023-12-02 03:57:41 +0900 [Bug #20033] Dynamic regexp should not assign captures commit ec83bd7356d639fe34f6843c4f1805c63cfdfa49 Author: Kevin Newton AuthorDate: 2023-12-02 02:06:57 +0900 Commit: git[bot] CommitDate: 2023-12-02 03:46:52 +0900 [ruby/prism] Provide heredoc? queries https://github.com/ruby/prism/commit/e148e8fe6a commit 2a8d9c59ff151e8e2274e5f788745e070111b8ab Author: Jemma Issroff AuthorDate: 2023-12-02 03:00:20 +0900 Commit: Jemma Issroff CommitDate: 2023-12-02 03:23:23 +0900 [PRISM] Account for RescueNodes with no statements We need a PUTNIL if a RescueNode has no statements. commit d6584a02011120c15b520fa08e5e5f0132b686de Author: Jemma Issroff AuthorDate: 2023-12-01 02:57:49 +0900 Commit: Jemma Issroff CommitDate: 2023-12-02 03:07:59 +0900 [PRISM] Fix behavior of BlockParameters with only one parameter This commit sets the ambiguous param flag if there is only one parameter on a block node. It also fixes a small bug with a trailing comma on params. commit ef466ac931dcb37f98fc89eba526c2593e1cddb0 Author: hogelog AuthorDate: 2023-12-02 03:03:58 +0900 Commit: git[bot] CommitDate: 2023-12-02 03:04:03 +0900 [ruby/irb] Scrub past history input before split (https://github.com/ruby/irb/pull/795) * Scrub past history input before split * Don't rewrite ENV["LANG"] https://github.com/ruby/irb/commit/0f344f66d9 commit 73440e1ef21e1dd7ca590e402d37b835b9b1f0bb Author: Eric Mueller AuthorDate: 2023-11-30 12:40:10 +0900 Commit: git[bot] CommitDate: 2023-12-02 02:52:38 +0900 [rubygems/rubygems] Many major_deprecations supply :removed_message Generally the removed message is very similar, but often it needs to specify that the feature has "been removed" instead of "will be removed", or "been deprecated". And a few chunks of text needed more substantial updates. And a number of them seemed to have been carefully crafted to make sense in either context, so I left those alone. https://github.com/rubygems/rubygems/commit/8d42cf9104 commit 079dfa1812e0f23a74c86e271245504b069b4c17 Author: Eric Mueller AuthorDate: 2023-11-30 11:51:55 +0900 Commit: git[bot] CommitDate: 2023-12-02 02:52:37 +0900 [rubygems/rubygems] major_deprecation accepts :removed_message If supplied, it uses that in place of the message for the case where the deprecation version is already past. https://github.com/rubygems/rubygems/commit/1deb73663c commit e5e1f9813e23c427cf45a25181b2e6d3cf97411a Author: Nobuyoshi Nakada AuthorDate: 2023-12-01 22:58:20 +0900 Commit: Nobuyoshi Nakada CommitDate: 2023-12-02 02:41:39 +0900 [Bug #19838] Flush delayed token nonconsecutive with the next token commit add0ab07e8b5e8f271e7bffa21c650c38a46c7db Author: Nobuyoshi Nakada AuthorDate: 2023-12-01 22:16:10 +0900 Commit: Nobuyoshi Nakada CommitDate: 2023-12-02 02:41:39 +0900 Extract `end_with_newline_p` commit 6e2b10d45653ed96529aafe981eae7e920110461 Author: Nobuyoshi Nakada AuthorDate: 2023-12-01 21:57:28 +0900 Commit: Nobuyoshi Nakada CommitDate: 2023-12-02 02:41:39 +0900 Prefer proper enum over bare int commit 9d209093429658664b476b7d0630463ec8748d2c Author: Jemma Issroff AuthorDate: 2023-12-02 02:20:16 +0900 Commit: Jemma Issroff CommitDate: 2023-12-02 02:20:16 +0900 [PRISM] Clean up trailing comment commit d224618beac0ed53a2f177d396f0eb6640e1a772 Author: Jemma Issroff AuthorDate: 2023-12-01 06:18:14 +0900 Commit: Jemma Issroff CommitDate: 2023-12-02 02:14:54 +0900 [PRISM] Restructure parameters Prior to this commit, we weren't accounting for hidden variables on the locals table, so we would have inconsistencies on the stack. This commit fixes params, and introduces a hidden_variable_count on the scope, both of which fix parameters. commit 5150ba0dbe98ca72f4ffb10de559b204b46eb56a Author: Kevin Newton AuthorDate: 2023-12-02 00:51:41 +0900 Commit: Kevin Newton CommitDate: 2023-12-02 02:03:09 +0900 [prism] Update to latest numbered parameters commit cdb74d74afb87a0d7048a53aaf12d32516033a3c Author: Kevin Newton AuthorDate: 2023-12-01 10:47:08 +0900 Commit: Kevin Newton CommitDate: 2023-12-02 02:03:09 +0900 [ruby/prism] Change numbered parameters Previously numbered parameters were a field on blocks and lambdas that indicated the maximum number of numbered parameters in either the block or lambda, respectively. However they also had a parameters field that would always be nil in these cases. This changes it so that we introduce a NumberedParametersNode that goes in place of parameters, which has a single uint8_t maximum field on it. That field contains the maximum numbered parameter in either the block or lambda. As a part of the PR, I'm introducing a new UInt8Field type that can be used on nodes, which is just to make it a little more explicit what the maximum values can be (the maximum is actually 9, since it only goes up to _9). Plus we can do a couple of nice things in serialization like just read a single byte. https://github.com/ruby/prism/commit/2d87303903 commit 90d9c20a0c0df5565d5f95d5e14c58331fa5922f Author: Matt Valentine-House AuthorDate: 2023-11-10 23:51:14 +0900 Commit: Matt Valentine-House CommitDate: 2023-12-02 01:40:25 +0900 [PRISM] Compile RescueNode commit 8f3310dc7519682f382ed589c5c1ed5b41627451 Author: Kevin Newton AuthorDate: 2023-12-02 00:23:07 +0900 Commit: Kevin Newton CommitDate: 2023-12-02 00:23:07 +0900 Remove unused files in prism commit 64f33aea2b9afa85bb840e38b8130f738d56f1c3 Author: Kevin Newton AuthorDate: 2023-12-02 00:18:13 +0900 Commit: git[bot] CommitDate: 2023-12-02 00:18:19 +0900 [ruby/prism] Update snapshots https://github.com/ruby/prism/commit/f4c80c67dc commit cbe57caa246f57440667a53b4526ddabcea82df9 Author: Martin Emde AuthorDate: 2023-12-01 12:53:54 +0900 Commit: git[bot] CommitDate: 2023-12-02 00:17:20 +0900 [ruby/prism] Fix comments after HEREDOCs again. The problem was deeper than just looking back a single token. You can push the heredoc_end token way back into the list. We need to save the last location of a heredoc end to see if it's the last token in the file. Fixes https://github.com/ruby/prism/pull/1954 https://github.com/ruby/prism/commit/91dfd4eecd commit ffeec108cfccda71ff63167d41f090aa39c2432c Author: TSUYUSATO Kitsune AuthorDate: 2023-12-01 23:55:15 +0900 Commit: git[bot] CommitDate: 2023-12-02 00:15:28 +0900 [ruby/prism] Add missing context names to the switch in `debug_context` Now, `PM_DEBUG_LOGGING` can be available. https://github.com/ruby/prism/commit/569ffacb5f commit 417d7004062de3360d0ab104bc21c5e3b40eff86 Author: TSUYUSATO Kitsune AuthorDate: 2023-12-01 23:35:52 +0900 Commit: git[bot] CommitDate: 2023-12-02 00:15:01 +0900 [ruby/prism] Improve to handle unterminated strings Fix https://github.com/ruby/prism/pull/1946 This fixes to set an error position for unterminated strings to the opening delimiters. Previously, the error position was set to the end of the delimiter. The same fix applies to other string-like literals. Additionally, this fixes https://github.com/ruby/prism/pull/1946; that is, it adds the last part of the string even though the string literal does not terminate. https://github.com/ruby/prism/commit/c1240baafd commit 0e599336a20d698d2d7f62ed6db234124260e2cd Author: TSUYUSATO Kitsune AuthorDate: 2023-12-01 23:50:57 +0900 Commit: git[bot] CommitDate: 2023-12-02 00:13:45 +0900 [ruby/prism] Fix `not_provided` comment I don't know when it is changed, but the `not_provided` signature is changed. https://github.com/ruby/prism/commit/0255cc307d commit 3b21932d14a354eaedb1fdbe068efdfdc758a6ac Author: Matt Valentine-House AuthorDate: 2023-12-01 22:34:21 +0900 Commit: Matt Valentine-House CommitDate: 2023-12-02 00:04:13 +0900 [PRISM] Use depth_offset not transparent scopes for FOR commit ce5f5ca1d64f92e6d7a79dd73930a71d9d00513e Author: Matt Valentine-House AuthorDate: 2023-12-01 22:34:05 +0900 Commit: Matt Valentine-House CommitDate: 2023-12-02 00:04:13 +0900 [PRISM] Remove transparent scope nodes commit 43ef0da0fb308c937dd0261d5204bd72e8b6867a Author: Peter Zhu AuthorDate: 2023-12-01 23:56:32 +0900 Commit: Peter Zhu CommitDate: 2023-12-01 23:56:32 +0900 Add assertions for shape cache grandchild nodes commit 64c4bbb86cf5c2a7710bef4d481c6a05f780c632 Author: Hiroshi SHIBATA AuthorDate: 2023-12-01 18:12:55 +0900 Commit: git[bot] CommitDate: 2023-12-01 20:33:26 +0900 [ruby/prism] Add test/prism/snapshots/heredoc_with_comment.txt https://github.com/ruby/prism/commit/97b296a0f7 commit 7d142c08cb5b65e4ba110b116c41a8e5e3acc027 Author: Hiroshi SHIBATA AuthorDate: 2023-12-01 16:46:42 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-01 16:47:06 +0900 lib/helper only needs on flori/json repo commit 86045fca24be94db7a9cbf7a9126e43c212dcc55 Author: Hiroshi SHIBATA AuthorDate: 2023-12-01 15:51:26 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-01 16:47:06 +0900 Manually merged from flori/json > https://github.com/flori/json/pull/525 > Rename escape_slash in script_safe and also escape E+2028 and E+2029 Co-authored-by: Jean Boussier > https://github.com/flori/json/pull/454 > Remove unnecessary initialization of create_id in JSON.parse() Co-authored-by: Watson commit 0dfeb172968cdaefca2ab828c94d3e5f44d91f8f Author: Jean Boussier AuthorDate: 2023-04-14 02:22:29 +0900 Commit: Hiroshi SHIBATA CommitDate: 2023-12-01 16:47:06 +0900 Rename escape_slash in script_safe and also escape E+2028 and E+2029 It is rather common to directly interpolate JSON string inside