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

  • 1 participants
  • 3827 discussions
[ruby-core:125276] [Ruby Bug#22003] .bundle extensions not built when doing out-of-source build
by Kulikjak (Jakub Kulik) 11 May '26

11 May '26
Issue #22003 has been reported by Kulikjak (Jakub Kulik). ---------------------------------------- Bug #22003: .bundle extensions not built when doing out-of-source build https://bugs.ruby-lang.org/issues/22003 * Author: Kulikjak (Jakub Kulik) * Status: Open * ruby -v: ruby 4.0.2 (2026-03-17 revision d3da9fec82) +PRISM [amd64-solaris2.11] * Backport: 3.3: UNKNOWN, 3.4: UNKNOWN, 4.0: UNKNOWN ---------------------------------------- Hi, I encountered a pretty edge case extension build bug. When building Ruby out-of-source and executing the configure script with a full path in a workspace that contains "test" in its name, it fails to build all the extensions in the `.bundle/gems` directory. It can be easily reporoduced with the following: ``` > pwd /builds/testing/components/ruby/ruby-40 > mkdir build > cd build > /builds/testing/components/ruby/ruby-40/ruby-4.0.2/configure ... > /usr/gnu/bin/make -j 20 ... <the stuff in the .bundle directory is not built> ``` When doing it this way, the `srcdir` variable in the Makefile will be an absolute path, which is then used in `ext/configure-ext.mk` target and in `configure-ext.mk.tmpl` `Dir.glob` call, where the following line: ``` % next if extconf.any?{|f| f.include?(".bundle/gems") && f.include?("test") } ``` makes it omit all the extensions in the ".bundle/gems" directory. The problem is not there when I use a relative path (`../ruby-4.0.2/configure`) or when building directly in `ruby-4.0.2` (because the `srcdir` is relative in those cases). -- https://bugs.ruby-lang.org/
2 1
0 0
[ruby-core:125279] [Ruby Bug#22004] parse.y doesn't executes loop body with `while true || true` condition
by Earlopain (Earlopain _) 11 May '26

11 May '26
Issue #22004 has been reported by Earlopain (Earlopain _). ---------------------------------------- Bug #22004: parse.y doesn't executes loop body with `while true || true` condition https://bugs.ruby-lang.org/issues/22004 * Author: Earlopain (Earlopain _) * Status: Open * ruby -v: ruby 4.1.0dev (2026-04-15T13:47:25Z master d077df24a2) +PRISM [x86_64-linux] * Backport: 3.3: WONTFIX, 3.4: REQUIRED, 4.0: REQUIRED ---------------------------------------- ```rb while true || true puts 1 end ``` This should never exit but with parse.y, the body is never executed. It seems to happen when one of the conditions is a truthy literal. Something similar happens with `unitl`: ```rb until false && true puts 1 end ``` By moving the literals out to methods that just return them, it behaves like I would expect. Seems to have started happening in Ruby 3.3. -- https://bugs.ruby-lang.org/
3 2
0 0
[ruby-core:124918] [Ruby Bug#21940] Ruby::Box: `$_` returns stale value due to gvar_tbl caching
by dak2 (Daichi Kamiyama) 11 May '26

11 May '26
Issue #21940 has been reported by dak2 (Daichi Kamiyama). ---------------------------------------- Bug #21940: Ruby::Box: `$_` returns stale value due to gvar_tbl caching https://bugs.ruby-lang.org/issues/21940 * Author: dak2 (Daichi Kamiyama) * Status: Open * ruby -v: 4.0.1 * Backport: 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: UNKNOWN, 4.0: UNKNOWN ---------------------------------------- ## Environment - Ruby Version v4.0.1 - OS: macOS 15.6.1 (arm64) - `RUBY_BOX=1` enabled ## Reproduction ```shell echo -e "a\nb" | RUBY_BOX=1 ruby -e 'gets; $_; gets; p $_' ``` ## Expected ``` "b\n" ``` The second gets reads `"b"` and sets it to `$_`. `p $_` should return the latest value. ## Actual ``` "a\n" ``` `$_` returns the stale value from the first gets. ## Root Cause `$_` is a special variable stored in `svar`. Its getter (`rb_lastline_get`) reads the current value from svar each time it is called. However, when Box is enabled, I believe `rb_gvar_get()` caches the value in the Box's `gvar_tbl` on first access. On subsequent reads, it returns the cached value directly without calling the getter. Since gets updates `$_` via `rb_lastline_set()` which bypasses `rb_gvar_set()`, the cache becomes stale. -- https://bugs.ruby-lang.org/
3 4
0 0
[ruby-core:125215] [Ruby Bug#21986] RubyVM::AST incorrect location for literals followed by modifier `if`
by kddnewton (Kevin Newton) 11 May '26

11 May '26
Issue #21986 has been reported by kddnewton (Kevin Newton). ---------------------------------------- Bug #21986: RubyVM::AST incorrect location for literals followed by modifier `if` https://bugs.ruby-lang.org/issues/21986 * Author: kddnewton (Kevin Newton) * Status: Open * Backport: 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: UNKNOWN, 4.0: UNKNOWN ---------------------------------------- ``` irb(main):001> RubyVM::AbstractSyntaxTree.parse("1.0if true") => (SCOPE@1:0-1:10 tbl: [] args: nil body: (IF@1:0-1:10 (TRUE@1:6-1:10) (FLOAT@1:3-1:3 1.0) nil)) irb(main):002> RubyVM::AbstractSyntaxTree.parse("1if true") => (SCOPE@1:0-1:8 tbl: [] args: nil body: (IF@1:0-1:8 (TRUE@1:4-1:8) (INTEGER@1:1-1:1 1) nil)) irb(main):003> ``` -- https://bugs.ruby-lang.org/
2 1
0 0
[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) 10 May '26

10 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) 10 May '26

10 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
  • ← Newer
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • ...
  • 383
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.