94971 Commits

Author SHA1 Message Date
Burdette Lamar
554a78daab [ruby/stringio] [DOC] Doc for StringIO.getc
(https://github.com/ruby/stringio/pull/163)

https://github.com/ruby/stringio/commit/a126fe252f
2025-11-04 23:57:52 +00:00
Takashi Kokubun
a0376eb2cc
ZJIT: Fix --zjit-mem-size and add --zjit-exec-mem-size (#15041)
ZJIT: Fix --zjit-mem-size and resurrect --zjit-exec-mem-size
2025-11-04 13:56:35 -08:00
Takashi Kokubun
7a0d730ee3 Resurrect tests for StringScanner#rest?
that has not been obsolete.

Partially reverting https://github.com/ruby/ruby/pull/15049.
2025-11-04 13:40:10 -08:00
Takashi Kokubun
fffa4671a4 [ruby/strscan] Resurrect a method that has not been obsolete
(https://github.com/ruby/strscan/pull/169)

Partially revert https://github.com/ruby/strscan/pull/168 because
strscan_rest_p did not have `rb_warning("StringScanner#rest? is
obsolete")`.

It is actively used by the latest tzinfo.gem, and we shouldn't remove it
without deprecating it.

https://github.com/ruby/strscan/commit/f3fdf21189
2025-11-04 21:34:04 +00:00
Randy Stauner
962aa14f24
ZJIT: Add test to reproduce binarytrees crash (#15054) 2025-11-04 20:29:14 +00:00
Luke Gruber
f1f2dfebe8
Release VM lock before running finalizers (#15050)
We shouldn't run any ruby code with the VM lock held.
2025-11-04 14:46:01 -05:00
Nobuyoshi Nakada
e9e5a4a454 [ruby/strscan] Remove methods have been obsolete over two decades
https://github.com/ruby/strscan/commit/1387def685
2025-11-04 19:41:21 +00:00
Nobuyoshi Nakada
091a1cd880
Remove tests for obsolete StringScanner methods
ruby/strscan#168
2025-11-05 04:06:05 +09:00
kares
480080b5bf [ruby/stringio] fix: (jruby) failing to clean buffer's code-range
same bug as: https://github.com/jruby/jruby/issues/9035

https://github.com/ruby/stringio/commit/65b144b175
2025-11-04 18:54:15 +00:00
Nobuyoshi Nakada
36cd985db4 [ruby/strscan] Remove no longer used variable
Since https://github.com/ruby/strscan/commit/92961cde2b42.

https://github.com/ruby/strscan/commit/911f9c682a
2025-11-04 18:29:37 +00:00
Alan Wu
b6f00701cb
[DOC] Mention on top of vm_*.c files the VM translation unit they're in (#15048)
vm_method.c already mentions it.
2025-11-04 17:46:00 +00:00
John Hawthorn
14f6f7051b Fix rb_gc_impl_checking_shareable for modular GC
This implements it the same as the other modular GC functions
2025-11-04 09:28:53 -08:00
git
ee74b97e52 Update default gems list at 29847070f00184d7c0a97f8e1f18f5 [ci skip] 2025-11-04 16:16:28 +00:00
Nobuyoshi Nakada
29847070f0 [ruby/io-wait] bump up to 0.3.3
https://github.com/ruby/io-wait/commit/57bc0b752b
2025-11-04 16:14:15 +00:00
Nobuyoshi Nakada
cdcb490d2b
Tweak ENC_TRANS_SO_D
It corresponds to TRANSSODIR, that contains `$(arch)`, so should
contain it as well.
2025-11-04 20:25:11 +09:00
Jean Boussier
f1776e8f17 [ruby/json] Tentative fix for RHEL8 compiler
```
parser.c:87:77: error: missing binary operator before token "("
 #if JSON_CPU_LITTLE_ENDIAN_64BITS && defined(__has_builtin) && __has_builtin(__builtin_bswap64)
```

https://github.com/ruby/json/commit/fce1c7e84a
2025-11-04 11:07:31 +00:00
Jean Boussier
7c92401363 [ruby/json] Micro-optimize rstring_cache_fetch
Closes: https://github.com/ruby/json/pull/888

- Mark it as `inline`.
- Use `RSTRING_GETMEM`, instead of `RSTRING_LEN` and `RSTRING_PTR`.
- Use an inlinable version of `memcmp`.

```
== Parsing activitypub.json (58160 bytes)
ruby 3.4.6 (2025-09-16 revision https://github.com/ruby/json/commit/dbd83256b1) +YJIT +PRISM [arm64-darwin24]
Comparison:
              before:    11766.6 i/s
               after:    12272.1 i/s - 1.04x  faster

== Parsing twitter.json (567916 bytes)
ruby 3.4.6 (2025-09-16 revision https://github.com/ruby/json/commit/dbd83256b1) +YJIT +PRISM [arm64-darwin24]
Comparison:
              before:     1333.2 i/s
               after:     1422.0 i/s - 1.07x  faster

== Parsing citm_catalog.json (1727030 bytes)
ruby 3.4.6 (2025-09-16 revision https://github.com/ruby/json/commit/dbd83256b1) +YJIT +PRISM [arm64-darwin24]
Comparison:
              before:      656.3 i/s
               after:      673.1 i/s - 1.03x  faster

== Parsing float parsing (2251051 bytes)
ruby 3.4.6 (2025-09-16 revision https://github.com/ruby/json/commit/dbd83256b1) +YJIT +PRISM [arm64-darwin24]
Comparison:
              before:      276.8 i/s
               after:      276.4 i/s - same-ish: difference falls within error
```

https://github.com/ruby/json/commit/a67d1a1af4

Co-Authored-By: Scott Myron <samyron@gmail.com>
2025-11-04 08:49:57 +00:00
Jean Boussier
157ae44b1e [ruby/json] Extract JSON_CPU_LITTLE_ENDIAN_64BITS definition
Only apply these definitions on 64 bits archs, as it's unclear
if they have performance benefits or compatibility issues on
32bit archs.

https://github.com/ruby/json/commit/ddad00b746
2025-11-04 08:49:57 +00:00
git
55257b5038 Update default gems list at 83c2e3b92e25b766615600913cdca8 [ci skip] 2025-11-04 06:54:54 +00:00
Sorah Fukumori
83c2e3b92e [ruby/uri] v1.1.1
https://github.com/ruby/uri/commit/f1b05c89ab
2025-11-04 06:53:18 +00:00
Daisuke Aritomo
397bb12778 [ruby/uri] Re-allow consecutive, leading and trailing dots in EMAIL_REGEXP
Effectively reverts commit https://github.com/ruby/uri/commit/788274b180d6 and
https://github.com/ruby/uri/commit/0abac721d8fe.

EMAIL_REGEXP was mostly drawn from WHATWG HTML LS. This spec states that
it intentionally violates RFC 5322 to provide a practical regex for
validation.

> This requirement is a willful violation of RFC 5322, which defines a
> syntax for email addresses that is simultaneously too strict (before the
> "@" character), too vague (after the "@" character), and too lax
> (allowing comments, whitespace characters, and quoted strings in manners
> unfamiliar to most users) to be of practical use here.

The allowing of consecutive dot s(`a..a@`) and leading/trailing dots
(`.a@`, `a.@`) is not the only derivation from RFC 5322. If a truly RFC
5322-compliant regexp is needed, tt should be organized under a
different name, since too much departure from the original EMAIL_REGEXP
must be introduced.

https://github.com/ruby/uri/commit/c551d7020b
2025-11-04 06:45:16 +00:00
Nobuyoshi Nakada
447809658a [ruby/io-wait] Select packging files by pathspecs
https://github.com/ruby/io-wait/commit/c66a90f5b1
2025-11-04 05:53:37 +00:00
dependabot[bot]
0eac75df46 Bump gacts/run-and-post-run in /.github/actions/setup/directories
Bumps [gacts/run-and-post-run](https://github.com/gacts/run-and-post-run) from 1.4.2 to 1.4.3.
- [Release notes](https://github.com/gacts/run-and-post-run/releases)
- [Commits](d803f6920a...81b6ce503c)

---
updated-dependencies:
- dependency-name: gacts/run-and-post-run
  dependency-version: 1.4.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-03 18:39:11 -08:00
Burdette Lamar
15e64bd2e6 [ruby/stringio] [DOC] Doc for StringIO#gets
(https://github.com/ruby/stringio/pull/164)

https://github.com/ruby/stringio/commit/10e991e31d
2025-11-04 01:09:55 +00:00
Hiroshi SHIBATA
136157e772
Revert "[ruby/rubygems] Fix constants in TAR to be frozen"
This reverts commit 2c2eaa3103e5cf1cbfc2b16d9db975a9b8a0399a.
2025-11-04 10:02:09 +09:00
Burdette Lamar
be495013a7 [ruby/stringio] [DOC] Doc for StringIO#getbyte
(https://github.com/ruby/stringio/pull/162)

https://github.com/ruby/stringio/commit/95a7dd592c
2025-11-04 00:59:03 +00:00
Takashi Kokubun
9ca9407573
ZJIT: Implement register spill (#14936) 2025-11-03 16:49:25 -08:00
Burdette Lamar
0d210f4d39 [ruby/stringio] [DOC] Tweaks for StringIO#external_encoding
(https://github.com/ruby/stringio/pull/161)

https://github.com/ruby/stringio/commit/92656f5c66
2025-11-04 00:47:13 +00:00
Burdette Lamar
6695a3b333 [ruby/stringio] [DOC] Tweaks for StringIO#eof?
(https://github.com/ruby/stringio/pull/160)

https://github.com/ruby/stringio/commit/5034156245
2025-11-04 00:45:25 +00:00
Aaron Patterson
2c2eaa3103 [ruby/rubygems] Fix constants in TAR to be frozen
I would like to use the tar implementation inside a Ractor, but two of
the constants are not frozen.  This patch freezes the constants so we
can use it in a Ractor.

https://github.com/ruby/rubygems/commit/0ff4790f4c
2025-11-04 00:22:33 +00:00
Jeremy Evans
bac6a25ad3 [ruby/rubygems] Remove open-ended and prerelease dependency warnings when building gems
In general, rubygems should provide mechanism and not policy.

Pessimistic versioning is not universally better, and in many
cases, it can cause more problems than it solves. Rubygems should
not be warning against open-ended versioning when building gems.
The majority of the default gems with dependencies do not use
pessimistic versioning, which indicates that Ruby itself
recognizes that open-ended versioning is generally better.

In some cases, depending on a prerelease gem is the only choice
other than not releasing a gem. If you are building an extension
gem for a feature in a prerelease version of another gem, then
depending on the prerelease version is the only way to ensure
a compatible dependency is installed.

https://github.com/ruby/rubygems/commit/beba8dd065
2025-11-04 00:17:49 +00:00
Max Leopold
4001e81a8e
ZJIT: Inline String#bytesize (#15033)
Inline the `String#bytesize` function and remove the C call.
2025-11-03 15:46:26 -05:00
Randy Stauner
8117600232
ZJIT: Implement include_p for opt_(new|dup)array_send YARV insns (#14885)
These just call to the C functions that do the optimized test but this avoids the side exit.

See https://github.com/ruby/ruby/pull/12123 for the original CRuby/YJIT implementation.
2025-11-03 15:19:09 -05:00
Luke Gruber
16af727908
Avoid taking vm barrier in heap_prepare() (#14425)
We can avoid taking this barrier if we're not incremental marking or lazy sweeping.
I found this was taking a significant amount of samples when profiling `Psych.load`
in multiple ractors due to the vm barrier. With this change, we get significant improvements
in ractor benchmarks that allocate lots of objects.

-- Psych.load benchmark --

```
Before:            After:
r:   itr:   time   r:   itr:   time
0    #1:  960ms    0    #1:  943ms
0    #2:  979ms    0    #2:  939ms
0    #3:  968ms    0    #3:  948ms
0    #4:  963ms    0    #4:  946ms
0    #5:  964ms    0    #5:  944ms
1    #1:  947ms    1    #1:  940ms
1    #2:  950ms    1    #2:  947ms
1    #3:  962ms    1    #3:  950ms
1    #4:  947ms    1    #4:  945ms
1    #5:  947ms    1    #5:  943ms
2    #1: 1131ms    2    #1: 1005ms
2    #2: 1153ms    2    #2:  996ms
2    #3: 1155ms    2    #3: 1003ms
2    #4: 1205ms    2    #4: 1012ms
2    #5: 1179ms    2    #5: 1012ms
4    #1: 1555ms    4    #1: 1209ms
4    #2: 1509ms    4    #2: 1244ms
4    #3: 1529ms    4    #3: 1254ms
4    #4: 1512ms    4    #4: 1267ms
4    #5: 1513ms    4    #5: 1245ms
6    #1: 2122ms    6    #1: 1584ms
6    #2: 2080ms    6    #2: 1532ms
6    #3: 2079ms    6    #3: 1476ms
6    #4: 2021ms    6    #4: 1463ms
6    #5: 1999ms    6    #5: 1461ms
8    #1: 2741ms    8    #1: 1630ms
8    #2: 2711ms    8    #2: 1632ms
8    #3: 2688ms    8    #3: 1654ms
8    #4: 2641ms    8    #4: 1684ms
8    #5: 2656ms    8    #5: 1752ms
```
2025-11-03 14:30:59 -05:00
Jean Boussier
505fcf5dcf [ruby/json] ext/json/ext/json.h: Add missing newline at end of file
https://github.com/ruby/json/commit/3bc1787bd4
2025-11-03 17:02:42 +00:00
Jean Boussier
2f9e0d355e [ruby/json] Fix duplicate 'inline' declaration specifier
Followup: https://github.com/ruby/json/pull/889

https://github.com/ruby/json/commit/591510392a
2025-11-03 15:56:38 +00:00
Takashi Kokubun
4740b3d7aa [ruby/json] Fix check_dependency 2025-11-03 07:39:00 -08:00
Jean Boussier
c49e4db680 [ruby/json] parser.c: Always inline json_eat_whitespace
```
== Parsing activitypub.json (58160 bytes)
ruby 3.4.6 (2025-09-16 revision https://github.com/ruby/json/commit/dbd83256b1) +YJIT +PRISM [arm64-darwin24]
Warming up --------------------------------------
               after     1.174k i/100ms
Calculating -------------------------------------
               after     11.756k (± 0.9%) i/s   (85.06 μs/i) -     59.874k in   5.093438s

Comparison:
              before:    11078.6 i/s
               after:    11756.1 i/s - 1.06x  faster

== Parsing twitter.json (567916 bytes)
ruby 3.4.6 (2025-09-16 revision https://github.com/ruby/json/commit/dbd83256b1) +YJIT +PRISM [arm64-darwin24]
Warming up --------------------------------------
               after   130.000 i/100ms
Calculating -------------------------------------
               after      1.340k (± 0.3%) i/s  (746.06 μs/i) -      6.760k in   5.043432s

Comparison:
              before:     1191.1 i/s
               after:     1340.4 i/s - 1.13x  faster

== Parsing citm_catalog.json (1727030 bytes)
ruby 3.4.6 (2025-09-16 revision https://github.com/ruby/json/commit/dbd83256b1) +YJIT +PRISM [arm64-darwin24]
Warming up --------------------------------------
               after    68.000 i/100ms
Calculating -------------------------------------
               after    689.451 (± 1.6%) i/s    (1.45 ms/i) -      3.468k in   5.031470s

Comparison:
              before:      630.3 i/s
               after:      689.5 i/s - 1.09x  faster

== Parsing float parsing (2251051 bytes)
ruby 3.4.6 (2025-09-16 revision https://github.com/ruby/json/commit/dbd83256b1) +YJIT +PRISM [arm64-darwin24]
Warming up --------------------------------------
               after    27.000 i/100ms
Calculating -------------------------------------
               after    248.265 (± 0.8%) i/s    (4.03 ms/i) -      1.242k in   5.003185s

Comparison:
              before:      232.7 i/s
               after:      248.3 i/s - 1.07x  faster
```

https://github.com/ruby/json/commit/043880f6ab

Co-Authored-By: Scott Myron <samyron@gmail.com>
2025-11-03 13:12:47 +00:00
Jean Boussier
52a17bbe6d [ruby/json] parser.c: use rb_str_to_interned_str over rb_funcall
https://github.com/ruby/json/commit/21284ea649
2025-11-03 10:46:26 +00:00
Jean Boussier
0832e954c9 [ruby/json] parser.c: Extract json_string_cacheable_p
We can share that logic between the two functions.

https://github.com/ruby/json/commit/ac580458e0
2025-11-03 10:33:44 +00:00
Jean Boussier
ea0a411f25 [ruby/json] parser.c: simplify sorted insert loop in rstring_cache_fetch
https://github.com/ruby/json/commit/31453b8e95

Co-Authored-By: Scott Myron <samyron@gmail.com>
2025-11-03 10:13:37 +00:00
Jean Boussier
edebd83ea9 [ruby/json] parser.c: Skip checking for escape sequences in rstring_cache_fetch
The caller already know if the string contains escape sequences
so this check is redundant.

Also stop calling `rstring_cache_fetch` from `json_string_unescape`
as we know it won't match anyways.

```
== Parsing twitter.json (567916 bytes)
ruby 3.4.6 (2025-09-16 revision https://github.com/ruby/json/commit/dbd83256b1) +YJIT +PRISM [arm64-darwin24]
Warming up --------------------------------------
               after   122.000 i/100ms
Calculating -------------------------------------
               after      1.226k (± 0.3%) i/s  (815.85 μs/i) -      6.222k in   5.076282s

Comparison:
              before:     1206.2 i/s
               after:     1225.7 i/s - 1.02x  faster
```

https://github.com/ruby/json/commit/b8cdf3282d

Co-Authored-By: Scott Myron <samyron@gmail.com>
2025-11-03 09:58:01 +00:00
Jean Boussier
35a5e55133 [ruby/json] Centralize macro definitions
https://github.com/ruby/json/commit/1576ea7d47
2025-11-03 09:22:40 +00:00
BurdetteLamar
4a3d8346a6 [DOC] Tweaks for String#to_f 2025-11-02 13:44:11 -05:00
Satoshi Tagomori
c83a249f77 pend on Windows for timeouts 2025-11-03 02:06:11 +09:00
Satoshi Tagomori
89fa15b6f6 Fix incorrect RUBY_DEBUG range 2025-11-03 02:06:11 +09:00
Satoshi Tagomori
0116dd5e0c Make Namespace.root visible not only for debugging
There are many APIs that expects application codes overwrite global methods.
For example, warn() expects Warning.warn() is overwritten to hook warning
messages.
If we enable namespace, Warning.warn defined in the app code is visible
only in the namespace, and invisible from warn() defined in the root namespace.
So we have to enable users to overwrite Warning.warn in the root namespace.

This is ugly and temporal workaround. We need to define better APIs to enable
users to hook such behaviors in the different way from defining global methods.
2025-11-03 02:06:11 +09:00
Satoshi Tagomori
fa4c04a7f7 Use CFUNC namespace only for IFUNC frames, its behavior should be unchanged 2025-11-03 02:06:11 +09:00
Satoshi Tagomori
12303e2e2e Fix use of inappropriate debug flag 2025-11-03 02:06:11 +09:00
Satoshi Tagomori
bb62a1cf8d Add flag to ignore EXPERIMENTAL warnings 2025-11-03 02:06:11 +09:00