| Age | Commit message (Collapse) | Author |
|
This allows these methods to be called from ractors.
Add new exported function `rb_vm_lock_with_barrier()` that requires
users to include "vm_sync.h"
|
|
snippets
Even with Ruby 4.0, snippets is not always available, such as in irb by
default. It would be better to just say nothing than to show a confusing
message.
https://github.com/ruby/error_highlight/commit/ef80ce73a1
|
|
[Bug #21780]
|
|
[Bug #21780]
|
|
Freeze Net::HTTP::SSL_ATTRIBUTES and IDEMPOTENT_METHODS_. Both constants
have been marked as :nodoc:.
Together with https://github.com/ruby/openssl/issues/521, this enables
HTTPS clients in non-main Ractors on Ruby 4.0.
https://github.com/ruby/net-http/commit/f24b3b358b
|
|
specified timeout (#15602)
* `Socket.tcp` and `TCPSocket.new` raises `IO::TiemoutError` with user specified timeout
In https://github.com/ruby/ruby/pull/11880, `rsock_connect()` was changed to raise `IO::TimeoutError` when a user-specified timeout occurs.
However, when `TCPSocket.new` attempts to connect to multiple destinations, it does not use `rsock_connect()`, and instead raises `Errno::ETIMEDOUT` on timeout.
As a result, the exception class raised on timeout could differ depending on whether there were multiple destinations or not.
To align this behavior with the implementation of `rsock_connect()`, this change makes `TCPSocket.new` raise `IO::TimeoutError` when a user-specified timeout occurs.
Similarly, `Socket.tcp` is updated to raise `IO::TimeoutError` when a timeout occurs within the method.
(Note that the existing behavior of `Addrinfo#connect_internal`, which Socket.tcp depends on internally and which raises `Errno::ETIMEDOUT` on timeout, is not changed.)
* [ruby/net-http] Raise `Net::OpenTimeout` when `TCPSocket.open` raises `IO::TimeoutError`.
With the changes in https://github.com/ruby/ruby/pull/15602, `TCPSocket.open` now raises `IO::TimeoutError` when a user-specified timeout occurs.
This change updates #connect to handle this case accordingly.
https://github.com/ruby/net-http/commit/f64109e1cf
|
|
https://hackerone.com/reports/3437743
|
|
|
|
|
|
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]
|
|
|
|
|
|
|
|
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
|
|
https://github.com/ruby/rubygems/commit/be5c4e27d9
|
|
https://github.com/ruby/rubygems/commit/09e6031a11
|
|
- Added a new `-j` option to `gem install` and `gem update`.
This option allows to specify the number of jobs we pass to `make`
when compiling gem with native extensions.
By default its the number of processors, but users may want a way
to control this.
You can use it like so: `gem install json -j8`
https://github.com/ruby/rubygems/commit/67aad88ca6
|
|
Fixes [Bug #21266].
|
|
* Fixes https://github.com/ruby/psych/issues/760
https://github.com/ruby/psych/commit/952008c898
|
|
This contains various improvements in tests for openssl integration:
- Remove DHE parameters from test servers. OpenSSL is almost always
compiled with ECC support nowadays and will prefer ECDHE over DHE.
- Remove an outdated omission for a bug in OpenSSL 1.1.0h released in
2018. None of our CI systems use this specific OpenSSL version.
- Use top-level return to skip tests if openssl is unavailable.
- Refactor tests for Net::HTTP#verify_callback.
https://github.com/ruby/net-http/commit/35c1745a26
|
|
This change updates `write_binary` to use a new class,
`AtomicFileWriter.open` to write the gem's files. This implementation
is borrowed from Active Support's [`atomic_write`](https://github.com/rails/rails/blob/main/activesupport/lib/active_support/core_ext/file/atomic.rb).
Atomic write will write the files to a temporary file and then once
created, sets permissions and renames the file. If the file is corrupted
- ie on failed download, an error occurs, or for some other reason, the
real file will not be created. The changes made here make `verify_gz`
obsolete, we don't need to verify it if we have successfully created the
file atomically. If it exists, it is not corrupt. If it is corrupt, the
file won't exist on disk.
While writing tests for this functionality I replaced the
`RemoteFetcher` stub with `FakeFetcher` except for where we really do
need to overwrite the `RemoteFetcher`. The new test implementation is much
clearer on what it's trying to accomplish versus the prior test
implementation.
https://github.com/ruby/rubygems/commit/0cd4b54291
|
|
When d2i_PKCS7_bio() and PEM_read_bio_PKCS7() fail to decode the input,
OpenSSL::PKCS7.new currently raises ArgumentError. The usual practice
in ruby/openssl where an error originates from the underlying OpenSSL
library is to raise OpenSSL::OpenSSLError.
Raise OpenSSL::PKCS7::PKCS7Error instead for consistency with
OpenSSL::PKCS7.read_smime and all other existing #initialize methods
that handle DER/PEM-encoded inputs.
https://github.com/ruby/openssl/commit/67a608ce53
|
|
Fix up ruby/ruby#15414, 29c29c2b7e972359ab83038c5dc27a7e53ae65c7
|
|
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
|
|
An OpenSSL function sometimes puts more than one error entry into the
thread-local OpenSSL error queue. Currently, we use the highest-level
entry for generating the exception message and discard the rest.
Let ossl_make_error() capture all current OpenSSL error queue contents
into OpenSSL::OpenSSLError#errors and extend
OpenSSL::OpenSSLError#detailed_message to include the information.
An example:
$ ruby -Ilib -ropenssl -e'OpenSSL::X509::ExtensionFactory.new.create_ext("a", "b")'
-e:1:in 'OpenSSL::X509::ExtensionFactory#create_ext': a = b: error in extension (name=a, value=b) (OpenSSL::X509::ExtensionError)
OpenSSL error queue reported 2 errors:
error:11000082:X509 V3 routines:do_ext_nconf:unknown extension name
error:11000080:X509 V3 routines:X509V3_EXT_nconf_int:error in extension (name=a, value=b)
from -e:1:in '<main>'
https://github.com/ruby/openssl/commit/d28f7a9a13
|
|
When not specified, the size is unknown (`nil`). Previously, the size was always `Float::INFINITY` and not specifiable.
[Feature #21701]
|
|
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\"]">.
|
|
|
|
[Bug #21775]
|
|
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]
|
|
|
|
is passed (#15530)
|
|
[Bug #21049]
|
|
This changeset introduces:
* `Binding#implicit_parameters`
* `Binding#implicit_parameter_get`
* `Binding#implicit_parameter_defined?`
[Bug #21049]
|
|
|
|
https://github.com/ruby/timeout/commit/4ae8631acf
|
|
[Bug #21776]
|
|
[Bug #21776]
|
|
|
|
```
Run options:
"--ruby=./miniruby -I../ruby/lib -I. -I.ext/common ../ruby/tool/runruby.rb --extout=.ext -- --disable-gems"
--excludes-dir=../ruby/test/.excludes
--name=!/memory_leak/
--seed=9843
[ 1/31] TestTimeout#test_timeout_in_trap_handler = 0.00 s
1) Error:
TestTimeout#test_timeout_in_trap_handler:
NoMethodError: undefined method 'kill' for nil
/Users/luke/workspace/ruby-dev/ruby/test/test_timeout.rb:9:in 'TestTimeout#kill_timeout_thread'
/Users/luke/workspace/ruby-dev/ruby/test/test_timeout.rb:424:in 'TestTimeout#test_timeout_in_trap_handler'
Finished tests in 2.715032s, 11.4179 tests/s, 52.3014 assertions/s.
31 tests, 142 assertions, 0 failures, 1 errors, 0 skips
ruby -v: ruby 4.0.0dev (2025-12-11T21:56:23Z fix_timeout_test https://github.com/ruby/timeout/commit/1c5eacbf9a) +PRISM [arm64-darwin24]
make: *** [yes-test-all] Error 1
```
https://github.com/ruby/timeout/commit/e5bc1de901
|
|
https://github.com/ruby/timeout/commit/c8d63ce3fe
|
|
Windows has no SIGUSR1.
There might be another usable signal, but this is breaking ruby master
so I just want a quick fix for now.
https://github.com/ruby/timeout/commit/b19043e8d0
|
|
[[Misc #21770]](https://bugs.ruby-lang.org/issues/21770)
|
|
* test(set): add test Set#xor does not mutate other_set
* Fix Set#^ to not mutate its argument
|
|
This reverts commit https://github.com/ruby/json/commit/b7e1734d9ca0.
https://github.com/ruby/json/commit/5793694ee6
|
|
* Fixes https://github.com/ruby/timeout/issues/17
https://github.com/ruby/timeout/commit/1a499a8f96
|
|
* Add tests related to Thread.handle_interrupt
* Fixes https://github.com/ruby/timeout/issues/41
https://github.com/ruby/timeout/commit/a52720e82a
|
|
While it's not allowed by the spec, some parsers like Oj do
accept it, and it can be blocking a transition.
Having this feature can help people migrate.
https://github.com/ruby/json/commit/3459499cb3
|
|
|
|
This commit allows codes like `a b do end.()` and `a b do end&.()`.
|