Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
|
|
|
|
|
|
As preparation for https://bugs.ruby-lang.org/issues/20205
making sure the test suite is compatible with frozen string
literals is making things easier.
|
|
[Feature #13557]
Setting the backtrace with an array of strings is lossy. The resulting
exception will return nil on `#backtrace_locations`.
By accepting an array of `Backtrace::Location` instance, we can rebuild
a `Backtrace` instance and have a fully functioning Exception.
Co-Authored-By: Étienne Barrié <etienne.barrie@gmail.com>
|
|
Make the entire series of message lines a multiline string so that the
`Warning.warn` hook can receive them in a single call.
|
|
|
|
|
|
|
|
The following parts will not be shown for `-h` option. And not to
reach 80 columns. Some terminal emulators (Windows command prompt at
least) wrap the cursor to the next line when reaching the rightmost
column, before exceeding.
|
|
|
|
|
|
This test has failed without YJIT too:
https://rubyci.s3.amazonaws.com/debian11/ruby-master/log/20240301T063003Z.fail.html.gz
However, it somehow fails more often on "YJIT Ubuntu / check RUSTC='rustc +1.58.0'" job.
Nobody is actively looking into this issue, and it's most likely not a
YJIT-specific issue, so let me silence this false positive until we
start working on this.
|
|
RubyVM::YJIT is conditionally defined, depending on --enable-yjit.
However, RubyVM::YJIT.enabled? is always defined as long as RubyVM::YJIT
is defined, so it seems weird to check RubyVM::YJIT.enabled? instead of
RubyVM::YJIT.
|
|
Instead of using `assert_in_out_err` directly.
|
|
These instance variables for conditional execution have remained
unchanged for nearly twenty years, since YARV merger.
|
|
In cfd7729ce7a31c8b6ec5dd0e99c67b2932de4732 we started using inline
caches for refinements. However, we weren't clearing inline caches when
defined on a reopened refinement module.
Fixes [Bug #20246]
|
|
Assume that there will never be any time zones with UTC offsets that
are subseconds. Historically, UTC offset has only been used down to
the second.
|
|
Fixes [Bug #19975]
|
|
|
|
|
|
callcc's implementation is fundamentally incompatible with ASAN. Since
callcc is deprecated and almost never used, it's probably OK to disable
callcc when ruby is compiled with ASAN.
[Bug #20273]
|
|
In cases where a method accepts both keywords and an anonymous
keyword splat, the method was not marked as taking an anonymous
keyword splat. Fix that in the compiler.
Doing that broke handling of nil keyword splats in yjit, so
update yjit to handle that.
Add a test to check that calling a method that accepts both
a keyword argument and an anonymous keyword splat does not
modify a passed keyword splat hash.
Move the anon_kwrest check from setup_parameters_complex to
ignore_keyword_hash_p, and only use it if the keyword hash
is already a hash. This should speed things up slightly as
it avoids a check previously used for all callers of
setup_parameters_complex.
Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
|
|
|
|
[Bug #20311]
It times out on some platform, so we can reduce iterations.
On my machine it completes in 250ms and RSS grows 8X.
|
|
[Bug #20311]
`rb_define_class_under` assumes it's called from C and that the
reference might be held in a C global variable, so it adds the
class to the VM root.
In the case of `Struct.new('Name')` it's wasteful and make
the struct immortal.
|
|
|
|
|
|
|
|
|
|
|
|
tempfile.gemspec
|
|
In the following code, the iclass tree of refinements in cref should be <iclass of Kernel@M2> -> <iclass of Kernel@M1> -> Kernel.
However, the iclass tree was broken because of code for included modules of refinements in rb_using_refinement().
Refinement#include is now removed, so this commit removes such unnecessary code.
```ruby
module M1
refine(Kernel) do
def f1 = :f1
end
end
module M2
refine(Kernel) do
def f2 = :f2
end
end
class Foo
using M1
using M2
def test
p f2 #=> :f2
p f1 # expected => :f1
# actual => undefined local variable or method 'f1' for an instance of Foo
end
end
Foo.new.test
```
|
|
This bug demonstrates the issue I reported. It passes on commit
https://github.com/ruby/ruby/commit/114e71d06280f9c57b9859ee4405ae89a989ddb6
but does not pass on commit (the immediate child of the above commit)
https://github.com/ruby/ruby/commit/1d2d25dcadda0764f303183ac091d0c87b432566
|
|
Fixes [Bug #5179]
|
|
|
|
|
|
|
|
In a method definition, the `begin` may not have an `nd_body`. When that
happens we get a null expr back from `last_expr_node` which causes a
segv for the following examples:
```ruby
def (begin;end).foo; end
def (begin;else;end).foo; end
def (begin;ensure;else;end).foo; end
```
In addition, I've added tests for other cases that weren't causing a
segv but appeared untested.`
Fixes https://bugs.ruby-lang.org/issues/20234
|
|
|
|
|
|
|
|
|
|
Previously, `StackOperand`s caching `sp_offset` was held across a
jit_prepare_call_with_gc(), which invalidates the offsets. With the
right register allocation state, the canary overlapped with the old
address of the receiver and YJIT clobbered the receiver writing the
canary.
|
|
|
|
|
|
|