Age | Commit message (Collapse) | Author |
|
Notes:
Merged: https://github.com/ruby/ruby/pull/5965
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/5965
|
|
This is an inelegant hack, by manually checking for this specific
code point in rb_str_inspect. Some testing indicates that this is
the only code point affected.
It's possible a better fix would be inside of lower-level encoding
code, such that rb_enc_isprint would return false and not true for
codepoint 0x85.
Fixes [Bug #16842]
Notes:
Merged: https://github.com/ruby/ruby/pull/4229
|
|
* Fix Array#[] with ArithmeticSequence with negative steps
Previously, Array#[] when called with an ArithmeticSequence
with a negative step did not handle all cases correctly,
especially cases involving infinite ranges, inverted ranges,
and/or exclusive ends.
Fixes [Bug #18247]
* Add Array#slice tests for ArithmeticSequence with negative step to test_array
Add tests of rb_arithmetic_sequence_beg_len_step C-API function.
* Fix ext/-test-/arith_seq/beg_len_step/depend
* Rename local variables
* Fix a variable name
Co-authored-by: Kenta Murata <3959+mrkn@users.noreply.github.com>
Notes:
Merged-By: mrkn <mrkn@ruby-lang.org>
|
|
This reverts commit 27278150685e738f84105d09843d3ba371146c7a and
58dc8bf8f15df9a33d191074e8a5d4946a3d59d5.
Visibility is an attribute of the method entry in a class, not an
attribute of the Method object.
Fixes [#18729]
Fixes [#18751]
Fixes [#18435]
Notes:
Merged: https://github.com/ruby/ruby/pull/5974
|
|
opt_aref_with is an optimized instruction for accessing a Hash using a
non-frozen string key (ie. from a file without frozen_string_literal).
It attempts to avoid allocating the string, and instead silently using a
frozen string (hash string keys are always fstrings).
Because this is just an optimization, it should be invisible to the
user. However, previously this optimization was could be seen via hashes
with default procs.
For example, previously:
h = Hash.new { |h, k| k.frozen? }
str = "foo"
h[str] # false
h["foo"] # true when optimizations enabled
This commit checks that the Hash doesn't have a default proc when using
opt_aref_with.
Notes:
Merged: https://github.com/ruby/ruby/pull/6196
|
|
They occasionaly fail with;
```
FLeaked thread: TestThreadQueue#test_queue_pop_timeout: #<Thread:0x0000000108e38e48 /Users/runner/work/ruby/ruby/src/test/ruby/test_thread_queue.rb:123 sleep>
.Finished thread: TestThreadQueue#test_deny_pushers: #<Thread:0x0000000108e38e48 /Users/runner/work/ruby/ruby/src/test/ruby/test_thread_queue.rb:123 dead>
...
Retrying...
1) Failure:
TestThreadQueue#test_sized_queue_pop_timeout [/Users/runner/work/ruby/ruby/src/test/ruby/test_thread_queue.rb:157]:
<#<Thread:0x00000001084bc7e8 /Users/runner/work/ruby/ruby/src/test/ruby/test_thread_queue.rb:156 sleep>> expected but was
<nil>.
2) Failure:
TestThreadQueue#test_queue_pop_timeout [/Users/runner/work/ruby/ruby/src/test/ruby/test_thread_queue.rb:124]:
<#<Thread:0x00000001083ff058 /Users/runner/work/ruby/ruby/src/test/ruby/test_thread_queue.rb:123 sleep>> expected but was
<nil>.
```
I'm hoping joining for longer should help avoid this.
Notes:
Merged: https://github.com/ruby/ruby/pull/6210
|
|
[Feature #18774]
As well as `SizedQueue#pop(timeout: sec)`
If both `non_block=true` and `timeout:` are supplied, ArgumentError
is raised.
Notes:
Merged: https://github.com/ruby/ruby/pull/6185
|
|
One year ago, the former method has been deprecated while the latter
has become an error. Then the 3.1 released, it is enough time to make
also the former an error.
Notes:
Merged: https://github.com/ruby/ruby/pull/6155
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/6197
|
|
(#6191)
Teach getblockparamproxy to handle the no-block case without exiting
Co-authored-by: John Hawthorn <john@hawthorn.email>
Co-authored-by: John Hawthorn <john@hawthorn.email>
Notes:
Merged-By: maximecb <maximecb@ruby-lang.org>
|
|
|
|
Revert "Synchronize the test thread sleep"
This reverts commit 307835fe314fea6e946a8c9b25bb3912680ed7d1.
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/6176
|
|
nil separator means no sepator, so chomp should not remove a line
separator.
Partially Fixes [Bug #18770]
Notes:
Merged: https://github.com/ruby/ruby/pull/6164
|
|
chomp"
This reverts commit 04f86ad0b5d2fe4711ff300d855228a6aed55f33.
This is causing CI issues, reverting for now.
|
|
Fixes case where Object includes a module that defines a constant,
then using class/module keyword to define the same constant on
Object itself.
Implements [Feature #18832]
Notes:
Merged: https://github.com/ruby/ruby/pull/6048
|
|
nil separator means no sepator, so chomp should not remove a line
separator.
Partially Fixes [Bug #18770]
Notes:
Merged: https://github.com/ruby/ruby/pull/5959
|
|
Previously, it was including one newline when chomp was used,
which is inconsistent with IO#each_line behavior. This makes
behavior consistent with IO#each_line, chomping all paragraph
separators (multiple consecutive newlines), but not single
newlines.
Partially Fixes [Bug #18768]
Notes:
Merged: https://github.com/ruby/ruby/pull/5960
|
|
Prior to this commit it was possible to call `ObjectSpace._id2ref` with
an offset static symbol object_id and get back a new, incorrectly tagged
symbol:
```
> sensible_sym = ObjectSpace._id2ref(:a.object_id)
=> :a
> nonsense_sym = ObjectSpace._id2ref(:a.object_id + 40)
=> :a
> sensible_sym == nonsense_sym
=> false
```
`nonsense_sym` ends up tagged with `RUBY_ID_INSTANCE` instead of
`RB_ID_LOCAL`. That means we can do silly things like:
```
> foo = Object.new
> foo.instance_variable_set(:a, 123)
(irb):2:in `instance_variable_set': `a' is not allowed as an instance variable name (NameError)
> foo.instance_variable_set(ObjectSpace._id2ref(:a.object_id + 40), 123)
=> 123
> foo.instance_variables
=> [:a]
```
This was happening because `get_id_entry` ignores the tag bits when
looking up the symbol. So `rb_id2str(symid)` would return a value and
then we'd continue on with the nonsense `symid`.
This commit prevents the situation by checking that the `symid` actually
matches what we get back from `get_id_entry`. Now we get a `RangeError`
for the nonsense id:
```
> ObjectSpace._id2ref(:a.object_id)
=> :a
> ObjectSpace._id2ref(:a.object_id + 40)
(irb):1:in `_id2ref': 0x000000000013f408 is not symbol id value (RangeError)
```
Co-authored-by: John Hawthorn <jhawthorn@github.com>
Notes:
Merged: https://github.com/ruby/ruby/pull/6147
|
|
In test_bug_reporter and test_rubyoptions we intentionally
test child processes that cause SEGV. We run them with YJIT
if the parent uses YJIT so that the text description
matches the parent RUBY_DESCRIPTION.
Notes:
Merged-By: maximecb <maximecb@ruby-lang.org>
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/6149
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/6146
Merged-By: nobu <nobu@ruby-lang.org>
|
|
Add send unit tests for YJIT
Notes:
Merged-By: maximecb <maximecb@ruby-lang.org>
|
|
This commit implements Objects on Variable Width Allocation. This allows
Objects with more ivars to be embedded (i.e. contents directly follow the
object header) which improves performance through better cache locality.
Notes:
Merged: https://github.com/ruby/ruby/pull/6117
|
|
Since #6006, we no longer avoid executing GC on mjit_worker.c and thus
there's no need to carefully change how we write code whether you're in
mjit.c or mjit_worker.c anymore.
Notes:
Merged-By: k0kubun <takashikkbn@gmail.com>
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/6099
|
|
This commit enables Arrays to move between size pools during compaction.
This can occur if the array is mutated such that it would fit in a
different size pool when embedded.
The move is carried out in two stages:
1. The RVALUE is moved to a destination heap during object movement
phase of compaction
2. The array data is re-embedded and the original buffer free'd if
required. This happens during the update references step
Notes:
Merged: https://github.com/ruby/ruby/pull/6099
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/6107
|
|
Apparently 203801566a186b7b1cbe899a06d0832923a1bdf9 broke YJIT's CI.
|
|
If you run tests with RUN_OPTS=--mjit, the test fixes in
https://github.com/ruby/ruby/pull/5872 don't work.
|
|
```
test/ruby/test_parse.rb:1384: warning: assigned but unused variable - obj
test/ruby/test_pattern_matching.rb:1162: warning: unused literal ignored
test/ruby/test_pattern_matching.rb:1165: warning: unused literal ignored
test/ruby/test_pattern_matching.rb:1161: warning: assigned but unused variable - a
test/ruby/test_pattern_matching.rb:1164: warning: assigned but unused variable - b
```
And a newline should be significant here.
|
|
[Bug #18902]
When a thread is killed because we forked, the `value` if left
to `Qundef`. Returning it woudl crash the VM.
Notes:
Merged: https://github.com/ruby/ruby/pull/6103
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/6097
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/6093
Merged-By: nobu <nobu@ruby-lang.org>
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/6087
|
|
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/6065
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/6077
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/6064
Merged-By: nobu <nobu@ruby-lang.org>
|
|
Previously, we didn't pop the frame that runs the TracePoint hook for
b_return events for blocks running as methods (bmethods). In case the
hook raises, that formed an infinite loop during stack unwinding in
hook_before_rewind().
[Bug #18060]
Notes:
Merged: https://github.com/ruby/ruby/pull/4638
|
|
Since enabling YJIT or MJIT drastically changes what could go wrong at
runtime, it's good to be front and center about whether they are enabled
when dumping a crash report. Previously, `RUBY_DESCRIPTION` and the
description printed when crashing can be different when a JIT is on.
Introduce a new internal data global, `rb_dynamic_description`, and set
it to be the same as `RUBY_DESCRIPTION` during initialization; use it
when crashing.
* version.c: Init_ruby_description(): Initialize and use
`rb_dynamic_description`.
* error.c: Change crash reports to use `rb_dynamic_description`.
* ruby.c: Call `Init_ruby_description()` earlier. Slightly more work
for when we exit right after printing the description but that
was deemed acceptable.
* include/ruby/version.h: Talk about how JIT info is not in
`ruby_description`.
* test/-ext-/bug_reporter/test_bug_reporter.rb: Remove handling for
crash description being different from `RUBY_DESCRIPTION`.
* test/ruby/test_rubyoptions.rb: ditto
Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
Co-authored-by: Alan Wu <alanwu@ruby-lang.org>
Notes:
Merged: https://github.com/ruby/ruby/pull/5872
|
|
`Regexp.new` now supports passing the regexp flags not only as an
`Integer`, but also as a `String. Unknown flags raise errors.
Notes:
Merged: https://github.com/ruby/ruby/pull/6039
|
|
Now second argument should be `true`, `false`, `nil` or Integer.
This flag is confused with third argument some times.
Notes:
Merged: https://github.com/ruby/ruby/pull/6039
|
|
|
|
related: [Bugs #18813] and eca31d24d606a73def3674938112dc3c5b79c445
|
|
This is a verbose mode only warning.
Notes:
Merged: https://github.com/ruby/ruby/pull/6038
|
|
|
|
Previously protected methods on refinements could never be called
because they were seen as being "defined" on the hidden refinement
ICLASS.
This commit updates calling refined protected methods so that they are
considered to be defined on the original class (the one being refined).
This ended up using the same behaviour that was used to check whether a
call to super was allowed, so I extracted that into a method.
[Bug #18806]
Notes:
Merged: https://github.com/ruby/ruby/pull/5966
|
|
Do not override the input string encoding at the time of preparation,
the source encoding is not determined from the input yet.
Notes:
Merged: https://github.com/ruby/ruby/pull/6015
|