summaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2025-05-21[rubygems/rubygems] Copy prerelease attribute to dependency resolver setsNathan Ladd
https://github.com/rubygems/rubygems/commit/5956e7f8e5
2025-05-20Make Addrinfo objects Ractor shareableAaron Patterson
Allow Addrinfo objects to be shared among Ractors. Addrinfo objects are already immutable, so I think it's safe for us to tag them as RUBY_TYPED_FROZEN_SHAREABLE shareable too. Notes: Merged: https://github.com/ruby/ruby/pull/13388
2025-05-20Remove SortedSet autoload and set/sorted_setJeremy Evans
Implements [Feature #21287] Notes: Merged: https://github.com/ruby/ruby/pull/13188
2025-05-19[ruby/json] Update json_encoding_test.rbGrant Birkinbine
https://github.com/ruby/json/commit/0ac54a8161
2025-05-19[ruby/json] fix for pretty_generate throwing wrong number of arguments errorCody Horton
https://github.com/ruby/json/commit/8433571dcf
2025-05-19[rubygems/rubygems] Simplify Gem::Platform#initializeSamuel Giddins
Based on PR feedback Signed-off-by: Samuel Giddins <segiddins@segiddins.me> https://github.com/rubygems/rubygems/commit/562d7aa087
2025-05-19[rubygems/rubygems] Ensure that Gem::Platform parses strings to a fix pointSamuel Giddins
The issue was that the property that ```ruby platform = Gem::Platform.new $string platform == Gem::Platform.new(platform.to_s) ``` was not always true. This property (of acchieving a fix point) is important, since `Gem::Platform` gets serialized to a string and then deserialized back to a `Gem::Platform` object. If it doesn't deserialize to the same object, then different platforms are used for the initial serialization than subsequent runs. I used https://github.com/segiddins/Scratch/blob/main/2025/03/rubygems-platform.rb to find the failing cases and then fixed them. With this patch, the prop check test now passes. https://github.com/rubygems/rubygems/commit/313fb4bcec
2025-05-16rb_gc_impl_copy_finalizer: generate a new object idJean Boussier
Fix a regression introduced by: https://github.com/ruby/ruby/pull/13155 Notes: Merged: https://github.com/ruby/ruby/pull/13350
2025-05-16Add missing lock to `rb_gc_impl_copy_finalizer`Jean Boussier
Notes: Merged: https://github.com/ruby/ruby/pull/13350
2025-05-16Prevent enabling yjit when zjit enabled (GH-13358)Daniel Colson
`ruby --yjit --zjit` already warns and exits, but it was still possible to enable both with `ruby --zjit -e 'RubyVM:YJIT.enable`. This commit prevents that with a warning and an early return. (We could also exit, but that seems a bit unfriendly once we're already running the program.) Co-authored-by: ywenc <ywenc@github.com> Notes: Merged: https://github.com/ruby/ruby/pull/13358 Merged-By: XrXr
2025-05-17Add a test case for `it` in a regex.Nick Dower
Co-authored-by: Alan Wu <XrXr@users.noreply.github.com> Notes: Merged: https://github.com/ruby/ruby/pull/13360
2025-05-17[Bug #21313] Handle `it` in rescue and ensure blocks.Nick Dower
The following is crashing for me: ```shell ruby --yjit --yjit-call-threshold=1 -e '1.tap { raise rescue p it }' ruby: YJIT has panicked. More info to follow... thread '<unnamed>' panicked at ./yjit/src/codegen.rs:2402:14: ... ``` It seems `it` sometimes points to the wrong value: ```shell ruby -e '1.tap { raise rescue p it }' false ruby -e '1.tap { begin; raise; ensure; p it; end } rescue nil' false ``` But only when `$!` is set: ```shell ruby -e '1.tap { begin; nil; ensure; p it; end }' 1 ruby -e '1.tap { begin; nil; rescue; ensure; p it; end }' 1 ruby -e '1.tap { begin; raise; rescue; ensure; p it; end }' 1 ``` Notes: Merged: https://github.com/ruby/ruby/pull/13360
2025-05-16[Bug #20009] Support marshaling non-ASCII name class/moduleNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/13362
2025-05-16Prevent double free for too big repetition quantifiers (#13332)Hiroya Fujinami
Prevent double free for too big repetition quantifiers The previous implementation calls `free(node)` twice (on parsing and compiling a regexp) when it has an error, so it leads to a double-free issue. This commit enforces `free(node)` once by introducing a temporal pointer to hold parsing nodes. Notes: Merged-By: makenowjust <make.just.on@gmail.com>
2025-05-15Maintain same behavior regardless of tracepoint stateAaron Patterson
Always use opt_new behavior regardless of tracepoint state. Notes: Merged: https://github.com/ruby/ruby/pull/13232
2025-05-15[ruby/openssl] AWS-LC has support for parsing ber constructed strings nowSamuel Chiang
https://github.com/ruby/openssl/commit/cdfc08db50
2025-05-15Add missing lock in `rb_gc_impl_undefine_finalizer`Jean Boussier
The table is global so accesses must be synchronized. Notes: Merged: https://github.com/ruby/ruby/pull/13349
2025-05-15Ensure that forked process do not see invalid blocking operations. (#13343)Samuel Williams
Notes: Merged-By: ioquatix <samuel@codeotaku.com>
2025-05-15[Bug #21333] Prohibit hash modification inside Hash#update blockNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/13344
2025-05-14[rubygems/rubygems] Reenable skipped specs in truffleruby since they should ↵David Rodríguez
be fixed https://github.com/rubygems/rubygems/commit/a7cbec95c1
2025-05-14[Bug #21331] Prohibit hash modification during stlike loopNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/13329
2025-05-14Revert "[Bug #21331] Prohibit modification during stlike loop"Nobuyoshi Nakada
This reverts commit bb180b87b43c45e17ff49735a26d7a188d5c8396, which caused "malloc during GC" error on wasm. Notes: Merged: https://github.com/ruby/ruby/pull/13329
2025-05-13[Bug #21331] Prohibit modification during stlike loopNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/13317
2025-05-13Make `waiting_fd` behaviour per-IO. (#13127)Samuel Williams
- `rb_thread_fd_close` is deprecated and now a no-op. - IO operations (including close) no longer take a vm-wide lock. Notes: Merged-By: ioquatix <samuel@codeotaku.com>
2025-05-13variable.c: Refactor rb_obj_field_* to take shape_id_tJean Boussier
Notes: Merged: https://github.com/ruby/ruby/pull/13314
2025-05-13[ruby/json] Further improve parsing errorsJean Boussier
Report EOF when applicable instead of an empty fragment. Also stop fragment extraction on first whitespace. https://github.com/ruby/json/commit/cc1daba860 Notes: Merged: https://github.com/ruby/ruby/pull/13310
2025-05-13[ruby/json] parser.c: include line and column in error messagesJean Boussier
https://github.com/ruby/json/commit/30e35b9ba5 Notes: Merged: https://github.com/ruby/ruby/pull/13310
2025-05-13[ruby/stringio] Do not issue warning when calling set_encoding if string is ↵Jeremy Evans
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-12Remove respond_to check from Class#bind_callJohn Hawthorn
Notes: Merged: https://github.com/ruby/ruby/pull/13116
2025-05-12[ruby/psych] Fix dumping `StringIO` (and potentially others) on Ruby <= 2.7Earlopain
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-12YJIT: Split the block on optimized getlocal/setlocal (#13282)Takashi Kokubun
Notes: Merged-By: k0kubun <takashikkbn@gmail.com>
2025-05-12test_object_id.rb: use better randomnessJean Boussier
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[ruby/json] Favor decimal notation over scientific notation for floatsJean Boussier
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-11Allow T_CLASS and generic types to be too_complexJean Boussier
The intial complex shape implementation never allowed objects other than T_OBJECT to become too complex, unless we run out of shapes. I don't see any reason to prevent that. Ref: https://github.com/ruby/ruby/pull/6931 Notes: Merged: https://github.com/ruby/ruby/pull/13301
2025-05-11Skip mmtk/i686 tests for a whileSatoshi Tagomori
2025-05-11avoid calling ZALLOC after NEWOBJ_OF for RClass: need to return RClass not ↵Satoshi Tagomori
promoted
2025-05-11namespace on readSatoshi Tagomori
2025-05-09[ruby/psych] exception testsOrenGitHub
https://github.com/ruby/psych/commit/1e9b79f699
2025-05-09[ruby/psych] more special casesOrenGitHub
https://github.com/ruby/psych/commit/b33bf8b060
2025-05-09[ruby/psych] duplicate more testsOrenGitHub
https://github.com/ruby/psych/commit/a3be6429bf
2025-05-09[ruby/psych] add first test for safe load streamOrenGitHub
https://github.com/ruby/psych/commit/336553b412
2025-05-09Fix warnings in tests for ObjectSpace._id2refPeter Zhu
There's a lot of warnings when running test_objectspace.rb because of ObjectSpace._id2ref. For example: test_objectspace.rb:19: warning: ObjectSpace._id2ref is deprecated Notes: Merged: https://github.com/ruby/ruby/pull/13293
2025-05-09ZJIT: Fix a splitting condition for LHSTakashi Kokubun
Notes: Merged: https://github.com/ruby/ruby/pull/13279
2025-05-09Removed CGI library without CGI::Escape featuresHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/13275
2025-05-09Reduce loading class/module on CGIUtilTest and CGIEscapeTestHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/13275
2025-05-09Extract CGIEscapeTest from CGIUtilTestHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/13275
2025-05-09Support `require 'cgi/escape'` with extracting CGI::Escape from CGI::UtilHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/13275
2025-05-08Fix `remove_instance_variable` on complex objectsJean Boussier
Introduced in: https://github.com/ruby/ruby/pull/13159 Now that there is no longer a unique TOO_COMPLEX shape with no children, checking `shape->type == TOO_COMPLEX` is incorrect. Notes: Merged: https://github.com/ruby/ruby/pull/13280
2025-05-08[rubygems/rubygems] Update `TarWriter` test to store mtime in a variableEllen Marie Dash
https://github.com/rubygems/rubygems/commit/0e2cec3fa3
2025-05-08[rubygems/rubygems] Add mtime to Gem::Package::TarWriter#add_file argumentYusuke Nakamura
Since 9e21dd9, Gem::Package::TarWriter#add_file adds the file to the tar with Gem.source_date_epoch for its mtime. This behavior breaks the code depending on the previous add_file behavior. Therefore, add_file accepts mtime as an argument, and uses Gem.source_date_epoch if not specified. https://github.com/rubygems/rubygems/commit/7020ea98a0