Jeff Zhang
1ca066059f
ZJIT: Add Type::has_value method ( #15867 )
...
Resolves TODO added in #15863 (See https://github.com/ruby/ruby/pull/15863#discussion_r2687769112 )
Adds a method `Type::has_value` for comparing value specialized types with a `Const`.
2026-01-14 13:37:14 -05:00
Nobuyoshi Nakada
b8566faca5
[ruby/json] Remove trailing spaces [ci skip]
...
https://github.com/ruby/json/commit/15eb40dbdf
2026-01-14 21:30:19 +09:00
Scott Myron
a650c90fab
[ruby/json] initialize search.chunk_end to silence a warning about it being potentially uninitialized
...
https://github.com/ruby/json/commit/73818b80c8
2026-01-14 07:59:32 +00:00
Scott Myron
24ad90d3e0
[ruby/json] use a conditional to select SIMD implementation rather than pointer
...
https://github.com/ruby/json/commit/86a5cce405
2026-01-14 07:59:32 +00:00
git
875dce2f59
Update bundled gems list as of 2026-01-13
2026-01-14 06:55:49 +00:00
Hiroshi SHIBATA
323ad363ca
Switch filename of release and publish workflows
2026-01-14 15:22:04 +09:00
Hiroshi SHIBATA
ab522c8876
Stop to sync tsort changes
2026-01-14 14:47:06 +09:00
Hiroshi SHIBATA
3aa4aed0cb
Skip Onigumo to check latest version
2026-01-14 14:44:14 +09:00
Nobuyoshi Nakada
49ce12d2ef
Silence building rubyspec-capiext [ci skip]
2026-01-14 13:55:35 +09:00
Chris Hasiński
6e61496531
Pre-allocate IO.select result arrays based on input size ( #15850 )
...
io.c: pre-allocate IO.select result arrays based on input size
The ternary (rp?rb_ary_new():rb_ary_new2(0)) became pointless after
commit a51f30c671 (Variable Width Allocation, Mar 2022) made both
rb_ary_new() and rb_ary_new2(0) equivalent.
Instead of just removing the dead code, improve on the original intent
by pre-allocating based on the actual input array size. This avoids
reallocations when many FDs are ready.
Benchmark (100 ready FDs): ~8% improvement (5.59 -> 5.11 us/op)
2026-01-14 14:41:00 +13:00
Jeff Zhang
65a4845780
ZJIT: Constant-fold LoadField/GuardBitEquals from known-frozen object
...
Resolves https://github.com/Shopify/ruby/issues/915
When we have `LoadField` with a `Shape` return type, we can fold it similar to the object case.
`GuardBitEquals` can be removed when the argument is `Const` and the values are equal.
The behaviors for loading instances variables from frozen/dynamic objects are already covered in existing tests so no new tests were added.
2026-01-13 20:06:01 -05:00
Takashi Kokubun
4f8478f50c
misc/.vscode/settings.json: Fix rust-analyzer warnings
2026-01-13 15:27:45 -08:00
Peter Zhu
9f8505f06c
[ruby/mmtk] Implement object movement support for finalizer table
...
https://github.com/ruby/mmtk/commit/e5e2c1c347
2026-01-13 22:59:22 +00:00
Max Bernstein
6f38d3de7f
ZJIT: Only print bold text in TTY ( #15864 )
...
This is really irritating when piping to a file or pager.
2026-01-13 20:47:26 +00:00
Randy Stauner
1a0b356d40
Add pushtoarray insn to fix segfault with forwarding + splat
...
Example insns diff for `def x = [3]; def a(...) = b(*x, 2, 3, ...)`
== disasm: #<ISeq:a@-e:1 (1,13)-(1,42)>
local table (size: 1, argc: 0 [opts: 0, rest: -1, post: 0, block: -1, kw: -1@-1, kwrest: -1])
[ 1] "..."@0
0000 putself ( 1)[Ca]
0000 putself
0000 opt_send_without_block <calldata!mid:x, argc:0, FCALL|VCALL|ARGS_SIMPLE>
0000 splatarray true
0000 putobject 2
0000 putobject 3
+0000 pushtoarray 2
0000 getlocal_WC_0 "..."@0
0000 sendforward <calldata!mid:b, argc:1, ARGS_SPLAT|ARGS_SPLAT_MUT|FCALL|FORWARDING>, nil
0000 leave [Re]
This matches the insns produced by parse.y
2026-01-13 11:18:19 -08:00
tkling
9db0a8c7db
[DOC] zjit: small typo fix
...
prerequists -> prerequisites
2026-01-13 10:36:15 -05:00
Jun Aruga
6a0a3d605b
[ruby/openssl] Fix test_digest.rb in FIPS.
...
https://github.com/ruby/openssl/commit/27a9a92309
2026-01-13 15:22:09 +00:00
Edouard CHIN
b722d37f21
[ruby/rubygems] Add a missing "require 'etc'" statement:
...
- Ref https://github.com/ruby/rubygems/pull/9171#discussion_r2658056892
- Referencing the constant Etc may raise a `NameError` depending on
whether other Rubygems/Bundler codepath have evaluated a prior
"require 'etc'". This can be reproduced with this Gemfile:
```ruby
source "https://rubygems.org "
gem 'prism', github: "ruby/prism"
```
https://github.com/ruby/rubygems/commit/5d435e6863
2026-01-13 11:12:00 +00:00
eileencodes
b7dbdfe23a
[ruby/rubygems] Refactor atomic file write
...
This refactoring is based off the changes in
test/rubygems/test_gem_remote_fetcher.rb. It no longer uses tempfile as
a result.
https://github.com/ruby/rubygems/commit/be6fd6550b
2026-01-13 07:12:47 +00:00
卜部昌平
60cf8598b2
[nit] refactor rename inline functions
...
Pretty sure commit 0f64da9672d88921439f6fdb306d16fece9b9c90 didn't
intend to welcome extension libraries to use these functions.
2026-01-13 11:53:43 +09:00
git
9fb9bfab60
Update default gems list at ead107f0d7bd3cf1f30428b7907b98 [ci skip]
2026-01-13 01:53:37 +00:00
Takashi Kokubun
ead107f0d7
[ruby/prism] Bump to v1.8.0
...
https://github.com/ruby/prism/commit/9c12be6e6a
2026-01-13 01:52:48 +00:00
Nobuyoshi Nakada
910fcfad14
mk_builtin_loader: Count local variable definition lines
2026-01-13 10:34:38 +09:00
Chris Hasiński
5de4cc5608
Fix regexp performance regression for patterns starting with s/k
...
Commit 981ee02c7c ("Fix performance problem with /k/i and /s/i") was
merged for Ruby 4.0 to enable partial Boyer-Moore optimization for
patterns containing 's' or 'k' by using the prefix before those
characters.
However, when 's' or 'k' appears at the start of a pattern (no usable
prefix), set_bm_skip() returns 0 and the code returned early without
setting any optimization mode, leaving reg->optimize at
ONIG_OPTIMIZE_NONE. This caused up to 30x slowdown for patterns like
/slackware/i when matched against strings with non-ASCII characters.
This patch keeps the improvement from 981ee02c7c for patterns with
3+ char prefix, while fixing the regression by falling back to
ONIG_OPTIMIZE_EXACT_IC with the full pattern when the usable prefix
is less than 3 characters.
Before: /\bslackware\b/i with non-ASCII string: 2.24 us/op
After: /\bslackware\b/i with non-ASCII string: 0.70 us/op (3.2x faster)
[Bug #21824 ]
2026-01-13 10:19:44 +09:00
Takashi Kokubun
09cd13114a
redmine-backporter.rb: Check remote-tracking branch
...
on `has_commit` check for the `backport` command.
I don't maintain local "master" branch on my ruby repository for stable
branch maintenance. I want just running `git fetch origin` to make it
work. It should work for those who pull origin/master into their local
master too.
2026-01-12 16:55:53 -08:00
Randy Stauner
7c91db9ea0
ZJIT: Check arg limit before pushing SendWithoutBLockDirect insn ( #15854 )
...
This reduces some processing and makes the HIR more accurate.
2026-01-12 23:28:06 +00:00
Peter Zhu
2daed3c022
[ruby/mmtk] Clear slot when object is freed
...
https://github.com/ruby/mmtk/commit/87290e45b2
2026-01-12 22:23:34 +00:00
Max Bernstein
328655633b
ZJIT: Optimize Integer#[]
...
This is used a lot in optcarrot.
2026-01-12 17:11:47 -05:00
Earlopain
ee1aa78bee
[ruby/prism] Correctly expose ripper state
...
It is for example used by `irb`, `rdoc`, `syntax_suggest`
https://github.com/ruby/prism/commit/255aeb2485
2026-01-12 22:08:25 +00:00
Randy Stauner
d81a11d4e6
ZJIT: Snapshot FrameState with reordered args before direct send
...
You can see the reordered args in the new Snapshot right before the
DirectSend insn:
v14:Any = Snapshot FrameState { pc: 0x00, stack: [v6, v11, v13], locals: [] }
PatchPoint MethodRedefined(Object@0x00, a@0x00, cme:0x00)
PatchPoint NoSingletonClass(Object@0x00)
v22:HeapObject[class_exact*:Object@VALUE(0x00)] = GuardType v6, HeapObject[class_exact*:Object@VALUE(0x00)]
- v23:BasicObject = SendWithoutBlockDirect v22, :a (0x00), v13, v11
- v16:Any = Snapshot FrameState { pc: 0x00, stack: [v23], locals: [] }
+ v23:Any = Snapshot FrameState { pc: 0x00, stack: [v6, v13, v11], locals: [] }
+ v24:BasicObject = SendWithoutBlockDirect v22, :a (0x00), v13, v11
+ v16:Any = Snapshot FrameState { pc: 0x00, stack: [v24], locals: [] }
2026-01-12 16:50:48 -05:00
Randy Stauner
351616af8c
ZJIT: Add snapshot tests for direct send
2026-01-12 16:50:48 -05:00
Max Bernstein
41d9eb784b
ZJIT: Inline Array#empty?
2026-01-12 16:43:49 -05:00
Max Bernstein
5cec11f45a
ZJIT: Inline Array#length
2026-01-12 16:43:49 -05:00
Earlopain
a1ba9f5733
[ruby/prism] Use one file for versioned parser classes
...
One per version seems excessive.
Do note that `rubocop-ast` used to require individual parser files. I wouldn't consider that to be part of the API since everything is autoloaded.
From a GitHub code search, I didn't find anyone else doing it like that.
https://github.com/ruby/prism/commit/458f622c34
2026-01-12 16:13:08 +00:00
Nobuyoshi Nakada
f34297604f
Remove a direct call of rb_raise in Onigmo
2026-01-12 20:24:56 +09:00
Nobuyoshi Nakada
aaf47cca03
Now onigenc_single_byte_code_to_mbclen checks out-of-bound
2026-01-12 20:24:55 +09:00
K.Takata
76b1d4a481
[k-takata/Onigmo] Disable error message for capture history when not needed
...
Add `#ifdef USE_CAPTURE_HISTORY`.
https://github.com/k-takata/Onigmo/commit/8217be2c3a
2026-01-12 20:01:43 +09:00
K.Takata
81c1334904
[k-takata/Onigmo] Fix out-of-bounds read in parse_char_class()
...
(Close
https://github.com/k-takata/Onigmo/pull/139 )
/[\x{111111}]/ causes out-of-bounds read when encoding is a single byte
encoding. \x{111111} is an invalid codepoint for a single byte encoding.
Check if it is a valid codepoint.
https://github.com/k-takata/Onigmo/commit/d4cf99d30b
2026-01-12 20:01:43 +09:00
K.Takata
16086128cc
[k-takata/Onigmo] Suppress warning on 64-bit builds
...
https://github.com/k-takata/Onigmo/commit/ced209d5e9
2026-01-12 20:01:43 +09:00
K.Takata
ac379278e8
[k-takata/Onigmo] Fix stack overflow with X+++++++++++++++++++…
...
Imported the fix from:
4097828d7c
https://github.com/k-takata/Onigmo/commit/786b4849c1
2026-01-12 20:01:43 +09:00
K.Takata
f0b31a5898
[k-takata/Onigmo] Fix SEGV in onig_error_code_to_str() (Fix
...
https://github.com/k-takata/Onigmo/pull/132 )
When onig_new(ONIG_SYNTAX_PERL) fails with ONIGERR_INVALID_GROUP_NAME,
onig_error_code_to_str() crashes.
onig_scan_env_set_error_string() should have been used when returning
ONIGERR_INVALID_GROUP_NAME.
https://github.com/k-takata/Onigmo/commit/00cc7e28a3
2026-01-12 20:01:43 +09:00
K.Takata
496e74d0cc
[k-takata/Onigmo] Fix that onig_new() may crash
...
When onig_reg_init() returns an error, onig_free_body() which is called
via onig_new() may crash because some members are not properly
initialized. Fix it.
https://github.com/k-takata/Onigmo/commit/d2a090a57e
2026-01-12 20:01:42 +09:00
K.Takata
ad150e9039
[k-takata/Onigmo] Update version number (6.2.0)
...
* Update the version number to 6.2.0
* Update LTVERSION to 6:5:0.
https://github.com/k-takata/Onigmo/commit/9e0f7ceee0
2026-01-12 20:01:42 +09:00
K.Takata
a097878ed4
[k-takata/Onigmo] Comment out unused errors
...
https://github.com/k-takata/Onigmo/commit/5555ee4c81
2026-01-12 20:01:42 +09:00
K.Takata
916fbf1063
[k-takata/Onigmo] Update copyright information
...
* Update our copyright information.
* Import the latest information from oniguruma.
Related: #95
https://github.com/k-takata/Onigmo/commit/0d8662b500
2026-01-12 20:01:42 +09:00
K.Takata
85a7171b41
[k-takata/Onigmo] Add USE_CASE_MAP_API config
...
The case_map API is mainly (only?) used in Ruby.
Make it possible to disable the API.
https://github.com/k-takata/Onigmo/commit/80e289d6bb
2026-01-12 20:01:42 +09:00
K.Takata
f9131412f8
[k-takata/Onigmo] Revise set_bm_skip()
...
https://github.com/k-takata/Onigmo/commit/6875da50f7
2026-01-12 20:01:42 +09:00
K.Takata
bbf9bf3fc5
[k-takata/Onigmo] Remove code for backward BM search
...
The code has not been used for long.
(Oniguruma also removed this code.)
https://github.com/k-takata/Onigmo/commit/8796781fdd
2026-01-12 20:01:42 +09:00
K.Takata
fb7f344b09
[k-takata/Onigmo] Remove code for reg->int_map
...
https://github.com/k-takata/Onigmo/commit/6c58de82d2
2026-01-12 20:01:42 +09:00
Nobuyoshi Nakada
6484a71a4f
Add Onigmo to sync_default_gems.rb
2026-01-12 20:01:41 +09:00