ml.ruby-lang.org
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

ruby-core

Thread Start a new thread
Download
Threads by month
  • ----- 2026 -----
  • May
  • April
  • March
  • February
  • January
  • ----- 2025 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
ruby-core@ml.ruby-lang.org

May 2026

  • 1 participants
  • 71 discussions
[ruby-core:125456] [Ruby Bug#22063] Regexp timeout accepts NaN and disables timeout
by afurm (Andrii Furmanets) 11 May '26

11 May '26
Issue #22063 has been reported by afurm (Andrii Furmanets). ---------------------------------------- Bug #22063: Regexp timeout accepts NaN and disables timeout https://bugs.ruby-lang.org/issues/22063 * Author: afurm (Andrii Furmanets) * Status: Open * ruby -v: ruby 4.1.0dev (2026-05-11T07:56:09Z master d0ea61cb87) +PRISM [arm64-darwin25] * Backport: 3.3: UNKNOWN, 3.4: UNKNOWN, 4.0: UNKNOWN ---------------------------------------- `Regexp.timeout=` and `Regexp.new(..., timeout:)` currently accept `Float::NAN`. The value passes the positive-timeout validation because `NaN <= 0` is false, and then `double2hrtime` stores it as a zero timeout value. This makes both APIs behave as if no timeout was configured: ```ruby p Regexp.new("foo", timeout: Float::NAN).timeout #=> nil Regexp.timeout = Float::NAN p Regexp.timeout #=> nil ``` `Float::NAN` is not a valid positive timeout value, so I expect it to raise `ArgumentError`, the same as `0` and negative values. Reproduced on master: ```text ruby 4.1.0dev (2026-05-11T07:56:09Z master d0ea61cb87) +PRISM [arm64-darwin25] ``` Proposed fix: Reject NaN in the shared regexp timeout validation helper before converting the double to `rb_hrtime_t`. Pull request: https://github.com/ruby/ruby/pull/16917 -- https://bugs.ruby-lang.org/
2 2
0 0
[ruby-core:125458] [Ruby Feature#13677] Add more details to error "Name or service not known (SocketError)"
by chucke (Tiago Cardoso) 11 May '26

11 May '26
Issue #13677 has been updated by chucke (Tiago Cardoso). PR to add this feature: https://github.com/ruby/ruby/pull/16918 . LMK what you think. ---------------------------------------- Feature #13677: Add more details to error "Name or service not known (SocketError)" https://bugs.ruby-lang.org/issues/13677#change-117262 * Author: dsbonev (Dimitar Bonev) * Status: Feedback ---------------------------------------- ruby version: `ruby 2.4.0p0 (2016-12-24 revision 57164) [x86_64-linux]` ruby script: ~~~ ruby require 'socket' TCPSocket.new 'nonexistent.example.com', 80 ~~~ Result: `getaddrinfo: Name or service not known (SocketError)` Expected: `getaddrinfo: Name or service not known for nonexistent.example.com (SocketError)` Why: This will make it easier to resolve errors of this kind by just looking at the logged messages. It is common for production and non-production (development, test) code to connect to different hosts which can produce errors due to wrong configuration. This change will make the ruby stdlib code more consistent as other methods already provide useful error information. Some examples: ~~~ ruby host = 'nonexistent.example.com'; port = 80 Resolv.getaddress host # => Resolv::ResolvError: no address for nonexistent.example.com Socket.getservbyname host # => SocketError: no such service nonexistent.example.com/tcp Net::HTTP.get Struct.new(:hostname, :port, :scheme).new(host, port, 'http') # => SocketError: Failed to open TCP connection to nonexistent.example.com:80 (getaddrinfo: Name or service not known) ~~~ If this issue will be resolved, please add any useful information to the error message in addition to the host. -- https://bugs.ruby-lang.org/
1 0
0 0
[ruby-core:125455] [Ruby Bug#22062] Regexp timeout accepts NaN and disables timeout
by afurm (Andrii Furmanets) 11 May '26

11 May '26
Issue #22062 has been reported by afurm (Andrii Furmanets). ---------------------------------------- Bug #22062: Regexp timeout accepts NaN and disables timeout https://bugs.ruby-lang.org/issues/22062 * Author: afurm (Andrii Furmanets) * Status: Open * ruby -v: ruby 4.1.0dev (2026-05-11T07:56:09Z master d0ea61cb87) +PRISM [arm64-darwin25] * Backport: 3.3: UNKNOWN, 3.4: UNKNOWN, 4.0: UNKNOWN ---------------------------------------- `Regexp.timeout=` and `Regexp.new(..., timeout:)` currently accept `Float::NAN`. The value passes the positive-timeout validation because `NaN <= 0` is false, and then `double2hrtime` stores it as a zero timeout value. This makes both APIs behave as if no timeout was configured: ```ruby p Regexp.new("foo", timeout: Float::NAN).timeout #=> nil Regexp.timeout = Float::NAN p Regexp.timeout #=> nil ``` `Float::NAN` is not a valid positive timeout value, so I expect it to raise `ArgumentError`, the same as `0` and negative values. Reproduced on master: ```text ruby 4.1.0dev (2026-05-11T07:56:09Z master d0ea61cb87) +PRISM [arm64-darwin25] ``` Proposed fix: Reject NaN in the shared regexp timeout validation helper before converting the double to `rb_hrtime_t`. Pull request: https://github.com/ruby/ruby/pull/16917 -- https://bugs.ruby-lang.org/
1 0
0 0
[ruby-core:125454] [Ruby Bug#22061] Regexp timeout accepts NaN and disables timeout
by afurm (Andrii Furmanets) 11 May '26

11 May '26
Issue #22061 has been reported by afurm (Andrii Furmanets). ---------------------------------------- Bug #22061: Regexp timeout accepts NaN and disables timeout https://bugs.ruby-lang.org/issues/22061 * Author: afurm (Andrii Furmanets) * Status: Open * ruby -v: ruby 4.1.0dev (2026-05-11T07:56:09Z master d0ea61cb87) +PRISM [arm64-darwin25] * Backport: 3.3: UNKNOWN, 3.4: UNKNOWN, 4.0: UNKNOWN ---------------------------------------- `Regexp.timeout=` and `Regexp.new(..., timeout:)` currently accept `Float::NAN`. The value passes the positive-timeout validation because `NaN <= 0` is false, and then `double2hrtime` stores it as a zero timeout value. This makes both APIs behave as if no timeout was configured: ```ruby p Regexp.new("foo", timeout: Float::NAN).timeout #=> nil Regexp.timeout = Float::NAN p Regexp.timeout #=> nil ``` `Float::NAN` is not a valid positive timeout value, so I expect it to raise `ArgumentError`, the same as `0` and negative values. Reproduced on master: ```text ruby 4.1.0dev (2026-05-11T07:56:09Z master d0ea61cb87) +PRISM [arm64-darwin25] ``` Proposed fix: Reject NaN in the shared regexp timeout validation helper before converting the double to `rb_hrtime_t`. Pull request: https://github.com/ruby/ruby/pull/16917 -- https://bugs.ruby-lang.org/
1 0
0 0
[ruby-core:115241] [Ruby master Bug#19986] Win32: `HOME` is set to just `HOMEDRIVE` if `HOMEPATH` is unset
by nobu (Nobuyoshi Nakada) 11 May '26

11 May '26
Issue #19986 has been reported by nobu (Nobuyoshi Nakada). ---------------------------------------- Bug #19986: Win32: `HOME` is set to just `HOMEDRIVE` if `HOMEPATH` is unset https://bugs.ruby-lang.org/issues/19986 * Author: nobu (Nobuyoshi Nakada) * Status: Open * Priority: Normal * Backport: 3.0: REQUIRED, 3.1: REQUIRED, 3.2: REQUIRED ---------------------------------------- ``` $ env -u HOME -u USERPROFILE -u HOMEPATH HOMEDRIVE=no/such/home ./miniruby.exe -e 'p ENV["HOME"], Dir.home' "no/such/home" "no/such/home" ``` `HOMEDRIVE` should be ignored without `HOMEPATH`, and `HOME` should fallback to `CSIDL_PROFILE`. -- https://bugs.ruby-lang.org/
1 1
0 0
[ruby-core:118940] [Ruby master Bug#20696] `IO.read` ignores `err:` option
by nobu (Nobuyoshi Nakada) 11 May '26

11 May '26
Issue #20696 has been reported by nobu (Nobuyoshi Nakada). ---------------------------------------- Bug #20696: `IO.read` ignores `err:` option https://bugs.ruby-lang.org/issues/20696 * Author: nobu (Nobuyoshi Nakada) * Status: Open * Backport: 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN ---------------------------------------- I expected the following code captures the error message, but `err:` option is ignored. ```shell-session $ ruby -e 'p IO.read("|ruby -e raise", err: %i[child out])' -e:1:in '<main>': unhandled exception "" ``` -- https://bugs.ruby-lang.org/
1 1
0 0
[ruby-core:124825] [Ruby Bug#21880] The ultra_safe mode of pstore bundled with Ruby 4.0 is broken.
by s3fxn (s3 fxn) 09 May '26

09 May '26
Issue #21880 has been reported by s3fxn (s3 fxn). ---------------------------------------- Bug #21880: The ultra_safe mode of pstore bundled with Ruby 4.0 is broken. https://bugs.ruby-lang.org/issues/21880 * Author: s3fxn (s3 fxn) * Status: Open * ruby -v: 4.0 * Backport: 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: UNKNOWN, 4.0: UNKNOWN ---------------------------------------- here is the reproduction code. $ ruby -v ruby 4.0.1 (2026-01-13 revision e04267a14b) +PRISM [x86_64-linux] $ cat pstore.rb #!/usr/bin/env ruby require "bundler/inline" gemfile do source "https://rubygems.org" if ENV['DEBUG'] gem "pstore", "0.1.4" else gem "pstore" end end db = PStore.new("pstore.db") db.ultra_safe = true db.transaction do puts db["now"] = Time.now end $ ruby pstore.rb 2026-02-15 04:49:31 +0000 /home/s3fxn/.rubies/ruby-4.0.1/lib/ruby/gems/4.0.0/gems/pstore-0.2.0/lib/pstore.rb:676:in 'Ractor.make_shareable': Proc's self is not shareable: #<Proc:0x0000749f688df078 /home/s3fxn/.rubies/ruby-4.0.1/lib/ruby/gems/4.0.0/gems/pstore-0.2.0/lib/pstore.rb:673> (Ractor::IsolationError) from /home/s3fxn/.rubies/ruby-4.0.1/lib/ruby/gems/4.0.0/gems/pstore-0.2.0/lib/pstore.rb:676:in 'PStore#on_windows?' from /home/s3fxn/.rubies/ruby-4.0.1/lib/ruby/gems/4.0.0/gems/pstore-0.2.0/lib/pstore.rb:685:in 'PStore#save_data' from /home/s3fxn/.rubies/ruby-4.0.1/lib/ruby/gems/4.0.0/gems/pstore-0.2.0/lib/pstore.rb:575:in 'PStore#transaction' from pstore.rb:14:in '<main>' $ DEBUG=1 ruby pstore.rb 2026-02-15 04:49:53 +0000 -- https://bugs.ruby-lang.org/
6 6
0 0
[ruby-core:124604] [Ruby Bug#21847] Backport `syntax_suggest` 2.0.3 to supported branches
by Earlopain (Earlopain _) 09 May '26

09 May '26
Issue #21847 has been reported by Earlopain (Earlopain _). ---------------------------------------- Bug #21847: Backport `syntax_suggest` 2.0.3 to supported branches https://bugs.ruby-lang.org/issues/21847 * Author: Earlopain (Earlopain _) * Status: Open * Backport: 3.2: DONTNEED, 3.3: REQUIRED, 3.4: REQUIRED, 4.0: REQUIRED ---------------------------------------- Prism contains a translation layer for ripper, which until very recently didn't emit `on_sp` tokens. This has now been implemented to improve compatibility. However right after merging some `syntax_suggest` tests started failing: https://gist.github.com/schneems/834c75345b2085bda54dab69d913bcc0. `syntax_suggest` is using the ripper translation layer and is working around the missing `on_sp` tokens. Now that they are correctly created by prism, `syntax_suggest` is not able to handle these. For prism this is just a bugfix but I do not want to break `syntax_suggest` unnecessarily. I asked @schneems and this is what he had to say about it: https://github.com/ruby/syntax_suggest/pull/243#issuecomment-3779113958 Backport PRs: -- https://bugs.ruby-lang.org/
4 3
0 0
[ruby-core:124950] [Ruby Bug#21947] `Timeout.timeout` doesn't use `Timeout::ExitException` when Fiber scheduler is in use.
by ioquatix (Samuel Williams) 09 May '26

09 May '26
Issue #21947 has been reported by ioquatix (Samuel Williams). ---------------------------------------- Bug #21947: `Timeout.timeout` doesn't use `Timeout::ExitException` when Fiber scheduler is in use. https://bugs.ruby-lang.org/issues/21947 * Author: ioquatix (Samuel Williams) * Status: Open * Assignee: ioquatix (Samuel Williams) * Backport: 3.3: REQUIRED, 3.4: REQUIRED, 4.0: REQUIRED ---------------------------------------- The following example executes successfully after 7 seconds instead of timing out after 2. ```ruby require 'async' require 'net/http' start = Time.now Sync do Timeout.timeout 2 do Net::HTTP.get(URI 'https://httpbin.org/delay/5') puts "...request finished, no timeout though; in #{Time.now - start}s" end end puts "Duration: #{Time.now - start}s" # => ...request finished, no timeout though; in 7.7007s # Duration: 7.700962s ``` There are two issues: - `Net::HTTP` rescues `Timeout::Error` and retries. This causes 2s (timeout -> retry) + 5s execution time. - `Timeout.timeout` uses `Timeout::ExitException` when no exception is specified, but the Fiber scheduler code path was not updated. See <https://github.com/socketry/async/issues/448> for more discussion. -- https://bugs.ruby-lang.org/
3 4
0 0
[ruby-core:124920] [Ruby Bug#21941] Local variable becomes nil when YJIT enabled mid-method with fork/signal/ensure
by nicholasdower (Nick Dower) 09 May '26

09 May '26
Issue #21941 has been reported by nicholasdower (Nick Dower). ---------------------------------------- Bug #21941: Local variable becomes nil when YJIT enabled mid-method with fork/signal/ensure https://bugs.ruby-lang.org/issues/21941 * Author: nicholasdower (Nick Dower) * Status: Open * ruby -v: ruby 4.0.0 (2025-12-25 revision 553f1675f3) +PRISM [arm64-darwin25] * Backport: 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: UNKNOWN, 4.0: UNKNOWN ---------------------------------------- The following code results in the `read` local variable becoming nil, even though it is never reassigned: ``` def run fork_safe = ->(t) { t } RubyVM::YJIT.enable read, wakeup = IO.pipe Signal.trap("SIGCHLD") { wakeup.write("!") } begin while true begin fork { exit } next if read.wait_readable rescue Interrupt end end ensure end end run ``` Error: ``` repro.rb:13:in 'Object#run': undefined method 'wait_readable' for nil (NoMethodError) next if read.wait_readable ^^^^^^^^^^^^^^ from repro.rb:21:in '<main>' ``` See also: https://github.com/puma/puma/issues/3620 https://github.com/Shopify/ruby/issues/625 -- https://bugs.ruby-lang.org/
5 5
0 0
  • ← Newer
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.