91898 Commits

Author SHA1 Message Date
Takashi Kokubun
735f28388c [ruby/erb] Support all cgi.gem versions
(https://github.com/ruby/erb/pull/60)

https://github.com/ruby/erb/commit/de9bb8c3cc
2025-05-13 17:50:05 +00:00
Jean Boussier
9420fc8ad6 [ruby/stringio] Add a comment to explicit RUBY_FL_USER2 |
RUBY_FL_USER3
(https://github.com/ruby/stringio/pull/133)

This way when someone removes these flags from Ruby or update them,
they'll find this reference when greping.

Followup: https://github.com/ruby/stringio/pull/128

https://github.com/ruby/stringio/commit/fad26ee14b
2025-05-13 17:15:16 +00:00
BurdetteLamar
96b823a211 [DOC] Tweaks for String#<=> 2025-05-13 13:14:25 -04:00
Nobuyoshi Nakada
bb180b87b4 [Bug #21331] Prohibit modification during stlike loop 2025-05-13 23:16:58 +09:00
Samuel Williams
1e2a67e1b0 Fix typo in NEWS.md. 2025-05-13 23:16:21 +09:00
Jean Boussier
2ca8769443 Reclaim one VALUE from rb_classext_t
The `includer` field is only used for `T_ICLASS`, so by moving
it into the existing union we can save one `VALUE` per class
and module.
2025-05-13 14:55:39 +02:00
lukeg
c941fced21 Throw RuntimeError if getting/setting ractor local storage for non-main ractor
[Bug #19367]
2025-05-13 13:18:10 +02:00
Kazuhiro NISHIYAMA
7517d7629d
[DOC] Fix a link and sort links in NEWS.md 2025-05-13 19:28:56 +09:00
Jean Boussier
5974841d11 Remove outdated references to FL_SEEN_OBJ_ID 2025-05-13 12:02:19 +02:00
Samuel Williams
425fa0aeb5
Make waiting_fd behaviour per-IO. (#13127)
- `rb_thread_fd_close` is deprecated and now a no-op.
- IO operations (including close) no longer take a vm-wide lock.
2025-05-13 19:02:03 +09:00
Jean Boussier
a6435befa7 variable.c: Refactor rb_obj_field_* to take shape_id_t 2025-05-13 10:35:34 +02:00
Kazuhiro NISHIYAMA
fa2414f29a
Fix a typo 2025-05-13 16:00:42 +09:00
Hiroshi SHIBATA
e46fbe624a Psych and SafeYAML was loaded Gem.load_yml, these changes is unnecessary 2025-05-13 15:49:20 +09:00
Hiroshi SHIBATA
4d9a1d5b6f Handle to look up CGI::EscapeExt instead of using LoadError. cgi/escape is provided snce Ruby 2.3 2025-05-13 14:37:24 +09:00
git
c40557099d Update default gems list at cd7495a1d0e003360c96bb9746c1a8 [ci skip] 2025-05-13 05:13:24 +00:00
Jean Boussier
cd7495a1d0 [ruby/json] Further improve parsing errors
Report EOF when applicable instead of an empty fragment.

Also stop fragment extraction on first whitespace.

https://github.com/ruby/json/commit/cc1daba860
2025-05-13 14:12:22 +09:00
Jean Boussier
8cc1aa82f1 [ruby/json] Add missing single quotes in error messages
https://github.com/ruby/json/commit/f3dde3cb2f
2025-05-13 14:12:22 +09:00
Jean Boussier
73d0bd5e90 [ruby/json] Release 2.12.0
https://github.com/ruby/json/commit/41f1f6939d
2025-05-13 14:12:22 +09:00
Jean Boussier
50ef208369 [ruby/json] parser.c: include line and column in error messages
https://github.com/ruby/json/commit/30e35b9ba5
2025-05-13 14:12:22 +09:00
Jean Boussier
8f008598c3 [ruby/json] parser.c: refactor raise_parse_error to have document start
https://github.com/ruby/json/commit/832b5b1a4c
2025-05-13 14:12:22 +09:00
Takashi Kokubun
a93d9fdcd2 Add a missing dependency for stringio
18d395e0784401585b5c14300e689de55e208647
2025-05-12 21:10:04 -07:00
Jeremy Evans
5e59ae186f [ruby/stringio] Fix Ruby 3.4 check
https://github.com/ruby/stringio/commit/a27c5d5e2e

Co-authored-by: Sutou Kouhei <kou@cozmixng.org>
2025-05-13 03:20:09 +00:00
Jeremy Evans
18d395e078 [ruby/stringio] Do not issue warning when calling set_encoding if string is chilled
StringIO does not warn for unchilled unfrozen string or for frozen
string, so it should not warn for chilled string.

https://github.com/ruby/stringio/commit/4ac33b8c70
2025-05-13 03:20:09 +00:00
John Hawthorn
9b8c846bdf Add an additional test to module_eqq 2025-05-12 19:05:19 -07:00
Jeremy Evans
203199251f Remove Set#to_h
This overrides Enumerable#to_h, but doesn't handle a block, breaking
backwards compatibility.

Set#to_h was added in the marshalling support commit, but isn't
necessary for that, as the underlying function is called. Remove
the method definition to restore backwards compatibility.
2025-05-13 10:09:58 +09:00
Nobuyoshi Nakada
b758b6f204
Prevent namespace inspected strings from GC 2025-05-13 09:05:08 +09:00
John Hawthorn
b0502e8f90 Remove respond_to check from Class#bind_call 2025-05-12 14:10:29 -07:00
Nobuyoshi Nakada
c6528548d0 [ruby/erb] Use cgi/escape instead of deprecated cgi/util 2025-05-12 09:59:58 -07:00
git
03a7f1ff08 Update default gems list at 957473d87fc7741c8d36caed8f05db [ci skip] 2025-05-12 16:22:47 +00:00
Aaron Patterson
957473d87f [ruby/psych] Bump version for release
https://github.com/ruby/psych/commit/b9dec9f811
2025-05-12 16:21:41 +00:00
Earlopain
0c94ae048a [ruby/psych] Fix dumping StringIO (and potentially others) on Ruby <= 2.7
In Ruby < 3.0, the superclass of StringIO was actually already `Data`,
but it doesn't have the expected shape. So, on these earlier versions it errors:
> NoMethodError: undefined method `members' for #<StringIO:0x00005641dd5f2880>
>    vendor/bundle/ruby/2.6.0/gems/psych-5.2.5/lib/psych/visitors/yaml_tree.rb:170:in `visit_Data'

This test doesn't fail on 2.7, presumably because it can pull in a newer `stringio` version.

https://github.com/ruby/psych/commit/0f40f56268
2025-05-12 16:19:38 +00:00
Takashi Kokubun
53a27f114a
YJIT: Split the block on optimized getlocal/setlocal (#13282) 2025-05-12 09:03:46 -07:00
Takashi Kokubun
0b6cee7329
ZJIT: Stop padding side exits (#13295) 2025-05-12 08:57:15 -07:00
Nobuyoshi Nakada
64944cf422
[DOC] Remove a garbage 2025-05-13 00:07:56 +09:00
Peter Zhu
85d9ebc995 Remove duplicate asan_unpoisoning_object
It's already defined in internal/sanitizers.h.
2025-05-12 10:51:17 -04:00
Burdette Lamar
bc6d48bd34
[DOC] Tweak for String#+@ (#13285) 2025-05-12 10:16:37 -04:00
Nobuyoshi Nakada
311b9352a1 [ruby/erb] [DOC] Make documentation 100%
https://github.com/ruby/erb/commit/9152ce8db4
2025-05-12 13:57:24 +00:00
Nobuyoshi Nakada
46e4c86737 Detect clock_gettime and clock_getres for winpthreads 2025-05-12 17:45:39 +09:00
Nobuyoshi Nakada
91375d7579 CI: Create proper revision.h on Windows 2025-05-12 17:45:39 +09:00
Nobuyoshi Nakada
d2ffdb1088 Explicit cast down from double to int 2025-05-12 17:45:39 +09:00
Nobuyoshi Nakada
ed2806117a Do not let files depend on a phony target 2025-05-12 17:45:39 +09:00
Nobuyoshi Nakada
543e3a1896 Cast up int instruction code to VALUE
Fix Visual C warnings:
```
iseq.c(3793): warning C4312: 'type cast': conversion from 'int' to 'void *' of greater size
iseq.c(3794): warning C4312: 'type cast': conversion from 'int' to 'void *' of greater size
```
2025-05-12 17:45:39 +09:00
Nobuyoshi Nakada
f1f0cc14cc Separate __has_attribute from defined(__has_attribute)
Fix Visual C warnings:
```
regenc.h(121): warning C4067: unexpected tokens following preprocessor directive - expected a newline
```
2025-05-12 17:45:39 +09:00
Jean Boussier
131ba059ca test_object_id.rb: use better randomness
When the test is repeated 20 or more times in the same process
it's not that unlikely for `rand(100_000)` to return the same thing
twice, causing `TestObjectIdTooComplexClass` to fail.

```
  1) Failure:
TestObjectIdTooComplexClass#test_dup_with_id_and_ivar [/tmp/ruby/src/trunk-repeat20-asserts/test/ruby/test_object_id.rb:172]:
Expected #<struct RubyVM::Shape
 id=6783,
 parent_id=6774,
 edge_name=:@___26417,
 next_field_index=2,
 heap_index=0,
 type=1,
 capacity=7> to be too_complex?.
```
2025-05-12 09:49:59 +02:00
Hiroshi SHIBATA
f638e14838
Support to sync cgi/escape from ruby/cgi repo 2025-05-12 12:52:33 +09:00
Randy Stauner
4464cbe5cd [rubygems/rubygems] Fix doctor command parsing of otool output
I have several gem dylibs that have a line matching "(compatibility "
with no file path preceding it.

https://github.com/rubygems/rubygems/commit/de9dc2bdc4
2025-05-12 11:09:22 +09:00
Jean Boussier
af79914002 [ruby/json] Favor decimal notation over scientific notation for floats
e.g.
```
JSON.dump(1746861937.7842371)
```

master:
```
"1.https://github.com/ruby/json/commit/746861937784+9"
```

This branch and older json versions:
```
https://github.com/ruby/json/commit/1746861937.7842371
```

In the end it's shorter, and according to `canada.json` benchmark
performance is the same.

https://github.com/ruby/json/commit/866f72a437
2025-05-12 11:09:11 +09:00
Takashi Kokubun
dc5555d74a Fix -Wmaybe-uninitialized
../namespace.c: In function ‘current_namespace’:
../namespace.c:221:48: warning: ‘proc_ns’ may be used uninitialized [-Wmaybe-uninitialized]
  221 |                     if (permit_calling_builtin || (proc_ns && NAMESPACE_USER_P(proc_ns)))
      |                         ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../namespace.c:204:31: note: ‘proc_ns’ was declared here
  204 |         const rb_namespace_t *proc_ns;
      |                               ^~~~~~~

In function ‘copy_ext_file’,
    inlined from ‘rb_namespace_local_extension’ at ../namespace.c:855:18:
../namespace.c:768:21: warning: ‘written’ may be used uninitialized [-Wmaybe-uninitialized]
  768 |             wrote = fwrite(buffer+written, 1, read-written, dst);
      |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../namespace.c: In function ‘rb_namespace_local_extension’:
../namespace.c:748:25: note: ‘written’ was declared here
  748 |     size_t read, wrote, written;
      |                         ^~~~~~~

In function ‘copy_ext_file’,
    inlined from ‘rb_namespace_local_extension’ at ../namespace.c:855:18:
../namespace.c:768:21: warning: ‘read’ may be used uninitialized [-Wmaybe-uninitialized]
  768 |             wrote = fwrite(buffer+written, 1, read-written, dst);
      |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../namespace.c: In function ‘rb_namespace_local_extension’:
../namespace.c:748:12: note: ‘read’ was declared here
  748 |     size_t read, wrote, written;
      |            ^~~~
2025-05-11 13:37:47 -07:00
Jean Boussier
8b7a4d167a Handle GC triggering while building the initial id_to_obj_tbl
GC can trigger while we build the table, and if it sweeps an object
with an ID, it may not find it in the `id_to_obj` table.
2025-05-11 22:05:06 +02:00
Nobuyoshi Nakada
2fe8b9cd3d Copy to path with the base name 2025-05-12 02:50:25 +09:00