summaryrefslogtreecommitdiff
path: root/test/ruby
AgeCommit message (Collapse)Author
2025-12-17Revert the default size of Enumerator::Producer to infinityAkinori Musha
[Bug #21780]
2025-12-17Revert the override of Enumerator#to_set that performed size checksAkinori Musha
[Bug #21780]
2025-12-17[Bug #21787] IO::Buffer: Check addition overflowsNobuyoshi Nakada
https://hackerone.com/reports/3437743
2025-12-17IO::Buffer: Fill the test for `IO::Buffer#clear`Nobuyoshi Nakada
2025-12-16Make tracepoints with set_trace_func or TracePoint.new ractor local (#15468)Luke Gruber
Before this change, GC'ing any Ractor object caused you to lose all enabled tracepoints across all ractors (even main). Now tracepoints are ractor-local and this doesn't happen. Internal events are still global. Fixes [Bug #19112]
2025-12-16Box: fix the class name in testsNobuyoshi Nakada
2025-12-16Box: fix the environment variable nameNobuyoshi Nakada
2025-12-16Revert "[Feature #6012] Extend `source_location` for end positionNobuyoshi Nakada
and columns" This reverts commit 073c4e1cc712064e626914fa4a5a8061f903a637. https://bugs.ruby-lang.org/issues/6012#note-31 > we will cancel this feature in 4.0 because of design ambiguities > such as whether to return column positions in bytes or characters as > in [#21783]. [#21783]: https://bugs.ruby-lang.org/issues/21783
2025-12-15YJIT: Bail out if proc would be stored above stack topRandy Stauner
Fixes [Bug #21266].
2025-12-14ZJIT: Add a test for `--zjit-stats=<path>` optionNobuyoshi Nakada
Fix up ruby/ruby#15414, 29c29c2b7e972359ab83038c5dc27a7e53ae65c7
2025-12-14ZJIT: Fix tests about `--zjit-stats-quiet` optionNobuyoshi Nakada
The `--zjit-stats-quiet` and `--zjit-stats=quiet` options differ. The latter option, `=quiet`, does print stats to the file "quiet", but does not suppress output like yjit option `--yjit-stats=quiet`. Fix up ruby/ruby#15414, 29c29c2b7e972359ab83038c5dc27a7e53ae65c7
2025-12-13Enumerator.produce accepts an optional `size` keyword argumentAkinori Musha
When not specified, the size is unknown (`nil`). Previously, the size was always `Float::INFINITY` and not specifiable. [Feature #21701]
2025-12-13ZJIT: Nil-fill locals in direct send (#15536)Randy Stauner
Avoid garbage reads from locals in eval. Before the fix the test fails with <"[\"x\", \"x\", \"x\", \"x\"]"> expected but was <"[\"x\", \"x\", \"x\", \"x286326928\"]">.
2025-12-12ZJIT: Don't inline non-parameter localsRandy Stauner
2025-12-12Prevent ifunc procs from being made shareableÉtienne Barrié
[Bug #21775]
2025-12-12Array#rfindKevin Newton
Implement Array#rfind, which is the same as find except from the other side of the Array. Also implemented Array#find (as opposed to the generic one on Enumerable because it is significantly faster and to keep the implementations together. [Feature #21678]
2025-12-12ZJIT: Inline `Hash#[]=`Stan Lo
2025-12-13Fix binding.implicit_parameters_get/defined segfault when wrong name string ↵tomoya ishida
is passed (#15530)
2025-12-12Binding#implicit_parameters, etc. support the implicit "it" parameterYusuke Endoh
[Bug #21049]
2025-12-12Add Binding#implicit_parameters, etc.Yusuke Endoh
This changeset introduces: * `Binding#implicit_parameters` * `Binding#implicit_parameter_get` * `Binding#implicit_parameter_defined?` [Bug #21049]
2025-12-12Binding#local_variable_defined? raises a NameError for numbered params.Yusuke Endoh
[Bug #21776]
2025-12-12`Binding#local_variable_defined?` must not handle numbered parametersYusuke Endoh
[Bug #21776]
2025-12-12ZJIT: Don't specialize calls with kwsplat (#15513)Randy Stauner
2025-12-11Stop bumping RUBY_PATCHLEVEL in release versions (#15502)Takashi Kokubun
[[Misc #21770]](https://bugs.ruby-lang.org/issues/21770)
2025-12-12Fix Set#^ to not mutate its argument (#15296)Gil Desmarais
* test(set): add test Set#xor does not mutate other_set * Fix Set#^ to not mutate its argument
2025-12-11[Bug #19558] Allow ASCII range to mix with Unicode dumpNobuyoshi Nakada
2025-12-11[Bug #21712] Allow `.()` call for command with blockyui-knk
This commit allows codes like `a b do end.()` and `a b do end&.()`.
2025-12-11Allow String#strip etc. to take optional character selectorsShugo Maeda
[Feature #21552] Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-10Use rb_error_frozen_object in rb_class_modify_checkJeremy Evans
This provides information on the class of the frozen object. It also results in a much simpler implementation. Fixes [Bug #21374]
2025-12-10Use actual class instead of singleton class in frozen error messageJeremy Evans
With the following code: ```ruby object = [] object.singleton_class object.freeze object.instance_variable_set(:@a, 42) ``` The previous error message was: ``` can't modify frozen #<Class:#<Array:0x00000631d1308f78>>: [] ``` With this change, the error message is: ``` can't modify frozen Array: [] ``` Since we show the inspect value of the affected object, I think including the singleton class instead of the actual class if it exists makes the error message harder to understand.
2025-12-10Fix refinement modification of method visibility in superclassJeremy Evans
Previously, this didn't work correctly, resulting in a SystemStackError. This fixes the issue by finding the related superclass method entry, and updating the orig_me in the refinement method to point to the superclass method. Fixes [Bug #21446]
2025-12-10Fix allocationless anonymous splat keyword argument checkJeremy Evans
Previously, if an argument splat and keywords are provided by the caller, it did not check whether the method/proc accepted keywords before avoiding the allocation. This is incorrect, because if the method/proc does not accept keywords, the keywords passed by the caller are added as a positional argument, so there must be an allocation to avoid mutating the positional splat argument. Add a check that if the caller passes keywords, the method/proc must accept keywords in order to optimize. If the caller passes a keyword splat, either the method/proc must accept keywords, or the keyword splat must be empty in order to optimize. If keywords are explicitly disallowed via `**nil`, the optimization should be skipped, because the array is mutated before the ArgumentError exception is raised. In addition to a test for the correct behavior, add an allocation test for a method that accepts an anonymous splat without keywords. Fixes [Bug #21757]
2025-12-09ZJIT: Handle caller_kwarg in direct send when all keyword params are requiredRandy Stauner
2025-12-09ZJIT: Test additional arg passing scenariosRandy Stauner
2025-12-09Box: relax the condition of clean upNobuyoshi Nakada
It is impossible to delete DLLs being loaded on Windows. I guess that unnamed (no accessible path on the filesystem) files are not allowed essentially. The only way is to relax the condition, such as no files are left after the process terminated, probably.
2025-12-09Box: add a test case about deleting .so/.dll filesSatoshi Tagomori
2025-12-09Box: remove copied extension filesNobuyoshi Nakada
2025-12-09ZJIT: Support opt_newarray_send with PACK_BUFFERMax Bernstein
2025-12-09ZJIT: Add codegen for FixnumDiv (#15452)Abrar Habib
Fixes https://github.com/Shopify/ruby/issues/902 This pull request adds code generation for dividing fixnums. Testing confirms the normal case, flooring, and side-exiting on division by zero.
2025-12-09Remove unused local variables in test/ruby/test_io_buffer.rb (#15451)Étienne Barrié
2025-12-08Make `ruby_reset_leap_second_info` internalNobuyoshi Nakada
It is exported only for the extension library to test, but the method is no longer used since 29e31e72fb5a14194a78ec974c4ba56c33ad8d45.
2025-12-06Add error case tests for `File.path`Nobuyoshi Nakada
- for non-String argument - for NUL-contained argument - for ASCII-incompatible argument
2025-12-06Add support for `u128`, `U128`, `s128` and `S128` integers to `IO::Buffer`. ↵Samuel Williams
(#15399)
2025-12-05ZJIT: Account for when YJIT is on by default in test_zjit_enableAlan Wu
2025-12-05ZJIT: Skip GC.auto_compact test when unsupportedAlan Wu
2025-12-04Take VM lock in `class_switch_superclass` (#15356)Luke Gruber
Safe multi-ractor subclass list mutation We need to lock around mutation and accesses of a class's subclasses list. Unfortunately we also need to do this when creating singleton classes, as the singleton class does need to go into `super`'s subclasses list for CC invalidation purposes.
2025-12-05fix typo s/sharable/shareable/Koichi Sasada
2025-12-05Method and UnboundMethod can be sharableKoichi Sasada
with `RUBY_TYPED_FROZEN_SHAREABLE_NO_REC`, if the receiver object is shareable on Method objects.
2025-12-04Remove mismatched indentations warning (#15410)Étienne Barrié
2025-12-05Refine non-nil warnings for the deprecated variablesNobuyoshi Nakada