| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
https://github.com/ruby/ruby/actions/runs/4286361460/jobs/7466545010
http://ci.rvm.jp/results/trunk_gcc9@ruby-sp2-docker/4462424
http://ci.rvm.jp/results/trunk_clang_13@ruby-sp2-docker/4462422
|
| |
|
|
|
| |
Also avoid allocations when looking up `Fiber#storage` if not needed.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
[Bug #19439]
The instance variables were restore on the Regexp source,
not the regexp itself.
Unfortunately we have a bit of a chicken and egg problem.
The source holds the encoding, and the encoding need to be set on
the source to be able to instantiate the Regexp.
So the instance variables have to be read on the `source`.
To correct this we transfert the instance variables after
instantiating the Regexp.
The only way to avoid this would be to read the instance variable
twice and rewind.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This test is no longer passing:
```
1)
BigDecimal#remainder returns NaN if Infinity is involved FAILED
Expected Infinity.nan?
to be truthy but was false
/home/runner/work/ruby/ruby/src/spec/ruby/library/bigdecimal/remainder_spec.rb:58:in `block (2 levels) in <top (required)>'
/home/runner/work/ruby/ruby/src/spec/ruby/library/bigdecimal/remainder_spec.rb:4:in `<top (required)>'
```
https://github.com/ruby/bigdecimal/pull/243
|
|
|
|
|
|
| |
[Bug #19427]
The `proc` wouldn't be called either, that fixes both.
|
| |
|
|
|
|
|
|
| |
[Bug #19415]
It should be more reliable
|
|
|
|
|
|
|
|
|
|
| |
[Bug #19415]
If multiple threads attemps to load the same file concurrently
it's not a circular dependency issue.
So we check that the existing ThreadShield is owner by the current
fiber before warning about circular dependencies.
|
|
|
|
| |
This reverts commit fa49651e05a06512e18ccb2f54a7198c9ff579de.
|
|
|
|
|
|
|
|
|
|
| |
[Bug #19415]
If multiple threads attemps to load the same file concurrently
it's not a circular dependency issue.
So we check that the existing ThreadShield is owner by the current
fiber before warning about circular dependencies.
|
| |
|
| |
|
|
|
|
|
| |
* Add spec for eval and line coverage.
* Add test for main file coverage.
|
| |
|
|
|
| |
Also `Numeric#remainder` should.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit moves the classpath (and tmp_classpath) from instance
variables to the rb_classext_t. This improves performance as we no
longer need to set an instance variable when assigning a classpath to
a class.
I benchmarked with the following script:
```ruby
name = :MyClass
puts(Benchmark.measure do
10_000_000.times do |i|
Object.const_set(name, Class.new)
Object.send(:remove_const, name)
end
end)
```
Before this patch:
```
5.440119 0.025264 5.465383 ( 5.467105)
```
After this patch:
```
4.889646 0.028325 4.917971 ( 4.942678)
```
|
| |
|
|
|
|
| |
* It seems a better exception class too than NoMemoryError.
|
|
|
|
|
| |
* The limit depends on the implementation and platform, it seems unavoidable.
* See https://bugs.ruby-lang.org/issues/18518#note-9
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This was already the behavior when a single `'external:internal'`
encoding specifier string was passed. This makes the behavior
consistent for the case where separate external and internal
encoding specifiers are provided.
While here, fix the IO#set_encoding method documentation to
state that either the first or second argument can be a string
with an encoding name, and describe the behavior when the
external encoding is binary.
Fixes [Bug #18899]
|
|
|
|
| |
Handle the integert and the float parts separately in round_half_even
to prevent error occursions in floating point calculation.
|
|
|
|
|
| |
These tests do not only consume hundreds GiB bytes memory, result in
`rb_bug` when `RUBY_DEBUG` is enabled.
|
| |
|
|
|
|
|
|
|
|
|
| |
HOMEPATH is set to "\WINDOWS\system32" when running per "runas" session.
This directory is not writable by ordinary users, leading to errors with many ruby tools.
Also config files in the home directory are not recognized.
Still keeping HOME at first which is not used by native Windows,
but by ruby specs and by MSYS2 environment.
|
|
|
|
|
|
|
| |
Dir.home returns an UTF-8 string since ruby-3.0, but the actual
encoding of the bytes was CP_ACP or CP_OEMCP.
That led to invalid bytes when calling Dir.home with an unicode
username.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
argument
Previously, only certain values of the 3rd argument triggered a
deprecation warning.
First step for fix for bug #18797. Support for the 3rd argument
will be removed after the release of Ruby 3.2.
Fix minor fallout discovered by the tests.
Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
|
| |
|
|
|
|
| |
* See https://bugs.ruby-lang.org/issues/19078#note-30
|
|
|
|
|
|
|
| |
* Remove `require 'io/wait'` as it's part of core now.
* Update ruby specs using version gates.
* Add note about why it's conditional.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
(this includes emoji version 15.0)
|
|
|
|
|
|
| |
It can be configured by `--with-os-version-style=TYPE` option, and
just copies from theApple's installation as the default. We don't
know why it is major only.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
UnboundMethod records caller's class, like `D` or `E` on the
following case:
```ruby
class C
def foo = :foo
end
class D < C
end
class E < C
end
d = D.instance_method(:foo)
e = E.instance_method(:foo)
```
But `d` and `e` only refers `C#foo` so that UnboundMethod doesn't
record `D` or `E`. This behavior changes the following methods:
* `UnboundMethod#inspect` (doesn't show caller's class)
* `UnboundMethod#==` (`d == e` for example)
fix https://bugs.ruby-lang.org/issues/18798
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It's questionable whether we want to allow rstrip to work for strings
where the broken coderange occurs before the trailing whitespace and
not after, but this approach is probably simpler, and I don't think
users should expect string operations like rstrip to work on broken
strings.
In some cases, this changes rstrip to raise
Encoding::CompatibilityError instead of ArgumentError. However, as
the problem is related to an encoding issue in the receiver, and due
not due to an issue with an argument, I think
Encoding::CompatibilityError is the more appropriate error.
Fixes [Bug #18931]
|
| |
|
| |
|
| |
|