Age | Commit message (Collapse) | Author |
|
```
Leaked file descriptor: TestResolvDNS#test_multiple_servers_with_timeout_and_truncated_tcp_fallback: 15 : #<TCPSocket:fd 15, AF_INET, 127.0.0.1, 61633>
```
Notes:
Merged: https://github.com/ruby/ruby/pull/11428
|
|
Related: ruby/prism#2935
Notes:
Merged: https://github.com/ruby/ruby/pull/11415
|
|
|
|
default gems
https://github.com/rubygems/rubygems/commit/29357a5dd6
|
|
Using `-rtempfile` requires the tempfile built into Ruby, not the
currently developed one, so the tests aren't testing this tempfile.
https://github.com/ruby/tempfile/commit/ea2dec6f46
|
|
As @jeremyevans pointed out for commit eb2d8b1:
> Each Tempfile instance has a separate File instance and file descriptor:
>
> t = Tempfile.new
> t.to_i # => 6
> t.dup.to_i => 7
FinalizerManager will keep track of the open File objects for the
particular file and will only unlink the file when all of the File objects
have been closed.
https://github.com/ruby/tempfile/commit/753ab16642
|
|
This test is checking what happens if you try and define a class in a C
extension where that constant is already not a class. It was doing this
by overriding ::Date and then trying to require 'date. The issue with
this is that if we ever add 'date' as a dependency for the test runner,
this test will break because the test runner files get implicitly
required in an `assert_separately` block.
Better use an explicit class for this purpose which can't be accidentally
required elsewhere.
Notes:
Merged: https://github.com/ruby/ruby/pull/11400
|
|
Notes:
Merged-By: ono-max <[email protected]>
|
|
Previously, proc calls such as:
```ruby
proc{|| }.(**empty_hash)
proc{|b: 1| }.(**r2k_array_with_empty_hash)
```
both allocated hashes unnecessarily, due to two separate code paths.
The first call goes through CALLER_SETUP_ARG/vm_caller_setup_keyword_hash,
and is simple to fix by not duping an empty keyword hash that will be
dropped.
The second case is more involved, in setup_parameters_complex, but is
fixed the exact same way as when the ruby2_keywords hash is not empty,
by flattening the rest array to the VM stack, ignoring the last
element (the empty keyword splat). Add a flatten_rest_array static
function to handle this case.
Update test_allocation.rb to automatically convert the method call
allocation tests to proc allocation tests, at least for the calls
that can be converted. With the code changes, all proc call
allocation tests pass, showing that proc calls and method calls
now allocate the same number of objects.
I've audited the allocation tests, and I believe that all of the low
hanging fruit has been collected. All remaining allocations are
either caller side:
* Positional splat + post argument
* Multiple positional splats
* Literal keywords + keyword splat
* Multiple keyword splats
Or callee side:
* Positional splat parameter
* Keyword splat parameter
* Keyword to positional argument conversion for methods that don't accept keywords
* ruby2_keywords method called with keywords
Reapplies abc04e898b627ab37fa9dd5e330f239768778d8b, which was reverted at
d56470a27c5a8a2e7aee7a76cea445c2d29c0c59, with the addition of a bug fix and
test.
Fixes [Bug #20679]
Notes:
Merged: https://github.com/ruby/ruby/pull/11409
Merged-By: jeremyevans <[email protected]>
|
|
Bumps [rb-sys](https://github.com/oxidize-rb/rb-sys) from 0.9.100 to 0.9.101.
- [Release notes](https://github.com/oxidize-rb/rb-sys/releases)
- [Commits](https://github.com/oxidize-rb/rb-sys/compare/v0.9.100...v0.9.101)
---
updated-dependencies:
- dependency-name: rb-sys
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <[email protected]>
https://github.com/rubygems/rubygems/commit/3addc2c3e7
|
|
Bumps [rb-sys](https://github.com/oxidize-rb/rb-sys) from 0.9.100 to 0.9.101.
- [Release notes](https://github.com/oxidize-rb/rb-sys/releases)
- [Commits](https://github.com/oxidize-rb/rb-sys/compare/v0.9.100...v0.9.101)
---
updated-dependencies:
- dependency-name: rb-sys
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <[email protected]>
https://github.com/rubygems/rubygems/commit/d26f5824a7
|
|
When assertions are enabled, the following code triggers an assertion
error:
GC.disable
GC.start(immediate_mark: false, immediate_sweep: false)
10_000_000.times { Object.new }
This is because the GC.start ignores that the GC is disabled and will
start incremental marking and lazy sweeping. But the assertions in
gc_marks_continue and gc_sweep_continue assert that GC is not disabled.
This commit changes it for the assertion to pass if the GC was triggered
from a method.
Notes:
Merged: https://github.com/ruby/ruby/pull/11391
|
|
Make Range#step to consistently use + for iteration [Feature #18368]
Previously, non-numerics expected step to be integer,
and iterated with begin#succ, skipping over step value
steps. Since this commit, numeric and non-numeric iteration
behaves the same way, by using + operator.
Notes:
Merged-By: zverok <[email protected]>
|
|
This reverts commit abc04e898b627ab37fa9dd5e330f239768778d8b.
This caused problems in a Rails test.
Notes:
Merged: https://github.com/ruby/ruby/pull/11394
|
|
TracePoints with incompatible events (i.e. events not in ISEQ_TRACE_EVENTS)
with a method target will fail an assertion error because it does not
filter for the supported events. For example, the following lines will
cause an assertion error:
def foo; end
# No arguments passed into TracePoint.new enables all ISEQ_TRACE_EVENTS
TracePoint.new {}.enable(target: method(:foo))
# Raise is not supported with a target
TracePoint.new(:raise, :return) {}.enable(target: method(:foo))
foo
Crashes with:
Assertion Failed: vm_insnhelper.c:7026:vm_trace:(iseq_local_events & ~(0x0001 | 0x0002 | 0x0004 | 0x0008 | 0x0010| 0x0020| 0x0040 | 0x0100 | 0x0200 | 0x4000 | 0x010000| 0x020000)) == 0
Notes:
Merged: https://github.com/ruby/ruby/pull/11390
|
|
This commit fixes the following failure on OpenSSL master FIPS case.
```
1) Failure: test_ed25519_not_approved_on_fips(OpenSSL::TestPKey): OpenSSL::PKey::PKeyError expected but nothing was raised.
/home/runner/work/openssl/openssl/vendor/bundle/ruby/3.0.0/gems/test-unit-ruby-core-1.0.6/lib/core_assertions.rb:462:in `assert_raise'
/home/runner/work/openssl/openssl/test/openssl/test_pkey.rb:174:in `test_ed25519_not_approved_on_fips'
171: MC4CAQAwBQYDK2VwBCIEIEzNCJso/5banbbDRuwRTg9bijGfNaumJNqM9u1PuKb7
172: -----END PRIVATE KEY-----
173: EOF
=> 174: assert_raise(OpenSSL::PKey::PKeyError) do
175: OpenSSL::PKey.read(priv_pem)
176: end
177: end
```
Because FIPS compliance is a continually moving target. According to the [1],
FIPS 140-3 *currently* allows ED25519. The ED25519 is allowed again with the
latest OpenSSL FIPS by the commit [2], while it is not allowed in OpenSSL stable
version 3.x FIPS.
Remove this test because we want to keep our tests stable.
[1] https://github.com/openssl/openssl/discussions/22054
[2] https://github.com/openssl/openssl/commit/5f04124aab4a477d4e58149d8f04871ff7e5ea4b
https://github.com/ruby/openssl/commit/d43904b834
|
|
DSA kengen is not FIPS-approved. The `EVP_PKEY_paramgen` in the
`OpenSSL::PKey.generate_parameters("DSA")` raises a DSA error in FIPS by the
following commit. Split the test for DSA.
https://github.com/openssl/openssl/commit/49a35f0#diff-605396c063194975af8ce31399d42690ab18186b422fb5012101cc9132660fe1R611-R614
https://github.com/ruby/openssl/commit/5ca6eb4eca
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/11368
|
|
Previous, proc calls such as:
```ruby
proc{|| }.(**empty_hash)
proc{|b: 1| }.(**r2k_array_with_empty_hash)
```
both allocated hashes unnecessarily, due to two separate code paths.
The first call goes through CALLER_SETUP_ARG/vm_caller_setup_keyword_hash,
and is simple to fix by not duping an empty keyword hash that will be
dropped.
The second case is more involved, in setup_parameters_complex, but is
fixed the exact same way as when the ruby2_keywords hash is not empty,
by flattening the rest array to the VM stack, ignoring the last
element (the empty keyword splat). Add a flatten_rest_array static
function to handle this case.
Update test_allocation.rb to automatically convert the method call
allocation tests to proc allocation tests, at least for the calls
that can be converted. With the code changes, all proc call
allocation tests pass, showing that proc calls and method calls
now allocate the same number of objects.
I've audited the allocation tests, and I believe that all of the low
hanging fruit has been collected. All remaining allocations are
either caller side:
* Positional splat + post argument
* Multiple positional splats
* Literal keywords + keyword splat
* Multiple keyword splats
Or callee side:
* Positional splat parameter
* Keyword splat parameter
* Keyword to positional argument conversion for methods that don't accept keywords
* ruby2_keywords method called with keywords
Notes:
Merged: https://github.com/ruby/ruby/pull/11258
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/11386
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/11386
|
|
https://github.com/ruby/prism/commit/084baca463
|
|
https://github.com/ruby/prism/commit/9f1f7d08bd
|
|
(https://github.com/ruby/rdoc/pull/1154)
* Add missing footers
In #1152 the footer partial was only added to the index.rhtml file.
This commit adds the footer partial to the other template files.
* Remove unnecessary middle divs in nav
* Simplify sidebar's overflow settings
Because sidebar needs to be scrollable, its overflow should default to auto.
Currently it's set to hidden and force individual elements to set overflow auto,
which overcomplicates things.
https://github.com/ruby/rdoc/commit/b8c2bcd8db
|
|
The test is timing out on lpi4a so a longer timeout should fix it.
|
|
We need to remove from the finalizer_table after running all the
finalizers because GC could trigger during the finalizer which could
reclaim the finalizer table array.
The following code crashes:
1_000_000.times do
o = Object.new
ObjectSpace.define_finalizer(o, proc { })
end
Notes:
Merged: https://github.com/ruby/ruby/pull/11375
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/11373
|
|
(https://github.com/ruby/resolv/pull/58)
test_dns: Fix failure on Windows
1. Switch to #with_udp_and_tcp helper method for EACCES retries on Windows;
the given UDP socket is unnecessary though.
2. Using 127.0.0.1 should be fine, as it must give different host:port pair.
3. On Windows, 5 retries of bind(2) appears still flaky, doubling it for sure.
follow-up: https://github.com/ruby/resolv/pull/50
follow-up: https://github.com/ruby/resolv/commit/6252914e95dfdf8995d8074df6cafe6f0a76c1ca
https://github.com/ruby/resolv/commit/0a0d57e369
|
|
Under the following conditions the exception
`Resolv::DNS::Requester::RequestError: host/port don't match` is raised:
- Multiple nameservers are configured for Resolv::DNS
- A nameserver falls back from UDP to TCP
- TCP request hits Resolv::DNS timeout
- Resolv::DNS retries the next nameserver
More details here https://bugs.ruby-lang.org/issues/8285
https://github.com/ruby/resolv/commit/7d524df80e
Co-authored-by: Julian Mehnle <[email protected]>
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/11366
|
|
Some case it is difficult to know the calling method uses a block
or not with `send` on a general framework. So this patch stops
showing unused block warning on `send`.
example with test/unit:
```ruby
require 'test/unit'
class T < Test::Unit::TestCase
def setup
end
def test_foo = nil
end
```
=> /home/ko1/ruby/install/master/lib/ruby/gems/3.4.0+0/gems/test-unit-3.6.2/lib/test/unit/fixture.rb:284: warning: the block passed to 'priority_setup' defined at /home/ko1/ruby/install/master/lib/ruby/gems/3.4.0+0/gems/test-unit-3.6.2/lib/test/unit/priority.rb:183 may be ignored
because test/unit can call any setup method (`priority_setup` in this case) with a block.
Maybe we can show the warning again when we provide a way to recognize
the calling method uses a block or not.
Notes:
Merged: https://github.com/ruby/ruby/pull/11349
|
|
[Bug #20344]
Fix compile_next adding removable adjust label
Notes:
Merged: https://github.com/ruby/ruby/pull/11316
|
|
`RBOOL` is a macro to convert C boolean to Ruby boolean.
Notes:
Merged: https://github.com/ruby/ruby/pull/11351
|
|
The bug didn't impact master because this was largely refactored,
but it's still valuable to add the test for it to prevent future
regressions.
Notes:
Merged: https://github.com/ruby/ruby/pull/11359
|
|
https://github.com/ruby/psych/commit/64bfc308f8
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/11348
|
|
https://github.com/ruby/uri/commit/898b889811
|
|
For example, the following code leaks:
class MyRipper < Ripper
def initialize(src, &blk)
super(src)
@blk = blk
end
def warn(msg, *args) = @blk.call(msg)
end
$VERBOSE = true
def call_parse = MyRipper.new("if true\n end\n") { |msg| return msg }.parse
10.times do
500_000.times do
call_parse
end
puts `ps -o rss= -p #{$$}`
end
Before:
37536
53744
70064
86448
102576
119120
135248
151216
167744
183824
After:
19280
19696
19728
20336
20448
21408
21616
21616
21824
21840
Notes:
Merged: https://github.com/ruby/ruby/pull/11289
|
|
For example, the following code leaks:
class MyRipper < Ripper
def initialize(src, &blk)
super(src)
@blk = blk
end
def warn(msg, *args) = @blk.call(msg)
end
$VERBOSE = true
def call_parse = MyRipper.new("if true\n end\n") { |msg| return msg }.parse
10.times do
500_000.times do
call_parse
end
puts `ps -o rss= -p #{$$}`
end
Before:
34832
51952
69760
88048
105344
123040
141152
159152
176656
194272
After:
18400
20256
20272
20272
20272
20304
20368
20368
20368
20400
Notes:
Merged: https://github.com/ruby/ruby/pull/11288
|
|
(https://github.com/ruby/uri/pull/113)
* Fallback missing constants with RFC3986_PARSER
* raise missing constant
* Update test/uri/test_common.rb
Co-authored-by: Nobuyoshi Nakada <[email protected]>
* Update lib/uri/common.rb
Co-authored-by: Nobuyoshi Nakada <[email protected]>
* Update lib/uri/common.rb
Co-authored-by: Nobuyoshi Nakada <[email protected]>
---------
https://github.com/ruby/uri/commit/c2fdec079a
Co-authored-by: Nobuyoshi Nakada <[email protected]>
|
|
OpenSSL running in the FIPS mode will stop supporting DSA key
generation and signature generation due to a FIPS 140-3 requirement.
Although it appears that FIPS 186-5 still allows signature
verification in some cases, there would be little point in writing such
a specific test case.
DSA will still be tested if OpenSSL is not running in the FIPS mode.
test_generate_on_non_fips is merged to test_generate again.
https://github.com/ruby/openssl/commit/3651884fd2
|
|
Bumps [rb-sys](https://github.com/oxidize-rb/rb-sys) from 0.9.99 to 0.9.100.
- [Release notes](https://github.com/oxidize-rb/rb-sys/releases)
- [Commits](https://github.com/oxidize-rb/rb-sys/compare/v0.9.99...v0.9.100)
---
updated-dependencies:
- dependency-name: rb-sys
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <[email protected]>
https://github.com/rubygems/rubygems/commit/dd5df7d614
|
|
Bumps [rb-sys](https://github.com/oxidize-rb/rb-sys) from 0.9.98 to 0.9.100.
- [Release notes](https://github.com/oxidize-rb/rb-sys/releases)
- [Commits](https://github.com/oxidize-rb/rb-sys/compare/v0.9.98...v0.9.100)
---
updated-dependencies:
- dependency-name: rb-sys
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <[email protected]>
https://github.com/rubygems/rubygems/commit/6f05927746
|
|
(https://github.com/ruby/reline/pull/732)
Hash#inspect is proposed to change to {key: value, non_symbol_key => value} in https://bugs.ruby-lang.org/issues/20433#note-10
https://github.com/ruby/reline/commit/1fd73b358a
|
|
https://github.com/ruby/optparse/commit/19700e96d8
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/11308
|
|
(https://github.com/ruby/irb/pull/985)
https://github.com/ruby/irb/commit/9ce6972e71
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/11307
|
|
The parallel testing framework may create strings in a separate thread.
```
1) Failure:
TestStringMemory#test_byteslice_prefix [D:/a/ruby/ruby/src/test/ruby/test_string_memory.rb:40]:
One object allocation is expected, but allocated: [["D:/a/ruby/ruby/src/tool/lib/test/unit/parallel.rb", 42, String, "2240\x00\x00\x00\x00...
```
https://github.com/ruby/ruby/actions/runs/10222885396/job/28288271190?pr=11271#step:23:1026
Notes:
Merged: https://github.com/ruby/ruby/pull/11306
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/11297
|