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 -----
  • 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

July 2025

  • 2 participants
  • 175 discussions
[ruby-core:122782] [Ruby Feature#17473] Make Pathname to embedded class of Ruby
by Eregon (Benoit Daloze) 15 Jul '25

15 Jul '25
Issue #17473 has been updated by Eregon (Benoit Daloze). I have merged https://github.com/ruby/pathname/pull/53, it is clearly better for the maintenance of the gem at least. Now we need to figure out if we want to keep the copy in core in sync with the gem or not (if not it's going to be a "fun" gotcha that the pathname gem is faster than core Pathname). ---------------------------------------- Feature #17473: Make Pathname to embedded class of Ruby https://bugs.ruby-lang.org/issues/17473#change-114061 * Author: hsbt (Hiroshi SHIBATA) * Status: Closed * Assignee: akr (Akira Tanaka) ---------------------------------------- pathname is one of most useful utility class of Ruby. I'm happy to use Pathname without require it. Any thought? -- https://bugs.ruby-lang.org/
1 0
0 0
[ruby-core:122781] [Ruby Feature#17473] Make Pathname to embedded class of Ruby
by Eregon (Benoit Daloze) 15 Jul '25

15 Jul '25
Issue #17473 has been updated by Eregon (Benoit Daloze). Discussion at https://github.com/ruby/dev-meeting-log/blob/master/2025/DevMeeting-2025-07… I am disappointed, https://github.com/ruby/pathname/pull/53 makes the code clearly more maintainable and a lot easier to read, there is no value to have it in C. I don't see much value to have Pathname as a core class, `require "pathname"` is no big deal and since it depends on other gems & stdlib it's awkward. Having a partially-defined Pathname in core (missing some methods) seems the worst outcome. As pathname is already a gem, it also means we'll have two unsynchronized copies of the code, and with enough time maybe subtle behavior differences, this seems something nobody wants. @matz this decision is adding a lot of work to CRuby, and other Ruby implementations. Pathname or most of it should be defined in Ruby, having multiple copies of it in C, Java, Ruby, etc means useless duplication and things will get out of sync needlessly. > @nobu: if Pathname is embeded to the core, I prefer the C implementation to Ruby impl. Why? I see only disadvantages to that. > @ioquatix for the purpose of JIT isn't it better to write more Ruby in Ruby? > @shyouhei nobody wants to JIT a path manipulation. https://github.com/ruby/pathname/pull/53#issuecomment-2989134661 shows the Ruby code is faster than the C extension for Pathname. Even from a performance point of view it's bad to implement Pathname methods in C (for most methods). ---------------------------------------- Feature #17473: Make Pathname to embedded class of Ruby https://bugs.ruby-lang.org/issues/17473#change-114060 * Author: hsbt (Hiroshi SHIBATA) * Status: Closed * Assignee: akr (Akira Tanaka) ---------------------------------------- pathname is one of most useful utility class of Ruby. I'm happy to use Pathname without require it. Any thought? -- https://bugs.ruby-lang.org/
1 0
0 0
[ruby-core:122742] [Ruby Bug#21512] Socket.tcp_with_fast_fallback('example.com', 80, '127.0.0.1') fails with unknown socket domain: ipv4 (SocketError)
by osyoyu (Daisuke Aritomo) 15 Jul '25

15 Jul '25
Issue #21512 has been reported by osyoyu (Daisuke Aritomo). ---------------------------------------- Bug #21512: Socket.tcp_with_fast_fallback('example.com', 80, '127.0.0.1') fails with unknown socket domain: ipv4 (SocketError) https://bugs.ruby-lang.org/issues/21512 * Author: osyoyu (Daisuke Aritomo) * Status: Open * ruby -v: ruby 3.5.0dev (2025-07-13T04:37:15Z master f03cc0b514) +PRISM [x86_64-linux] * Backport: 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: UNKNOWN ---------------------------------------- The following code is expected to open a socket bound to the local IPv4 interface, but raises an SocketError. ```ruby require 'socket' Socket.tcp_with_fast_fallback('localhost', 8080, '127.0.0.1') ``` Expected behavior: Returns a `Socket` object Actuai behavior: Causes a SocketError (unknown socket domain: ipv4) I believe this is because Socket.tcp_with_fast_fallback is calling Addrinfo.getaddrinfo with `:ipv4` / `:ipv6` as its third argument, instead of `Socket::AF_INET` / `Socket::AF_INET6`. https://github.com/ruby/ruby/blob/b2a7b7699261d2a4ef8a9d5d38d3fb9dc99c8253/… -- https://bugs.ruby-lang.org/
3 3
0 0
[ruby-core:122777] [Ruby Feature#17473] Make Pathname to embedded class of Ruby
by deivid 15 Jul '25

15 Jul '25
Issue #17473 has been updated by deivid (David Rodríguez). Would it make sense to make `find`, `fileutils`, and `tmpdir` also builtin, given that `pathname` depends on them? ---------------------------------------- Feature #17473: Make Pathname to embedded class of Ruby https://bugs.ruby-lang.org/issues/17473#change-114055 * Author: hsbt (Hiroshi SHIBATA) * Status: Closed * Assignee: akr (Akira Tanaka) ---------------------------------------- pathname is one of most useful utility class of Ruby. I'm happy to use Pathname without require it. Any thought? -- https://bugs.ruby-lang.org/
1 0
0 0
[ruby-core:122776] [Ruby Feature#17473] Make Pathname to embedded class of Ruby
by hsbt (Hiroshi SHIBATA) 15 Jul '25

15 Jul '25
Issue #17473 has been updated by hsbt (Hiroshi SHIBATA). Status changed from Assigned to Closed I made `Pathname` to embedded core class now. * https://github.com/ruby/ruby/pull/13873 * https://github.com/ruby/ruby/pull/13885 * https://github.com/ruby/ruby/pull/13887 `Pathname#find`, `Pathname#mkpath`, `Pathname#rmtree` and `Pathname.mktmpdir` is remained on `lib/pathname.rb`. So, the users need to require `pathname.rb` for that methods. We should migrate them to `pathname_builtin.rb` or `pathname.c` without extra dependencies. ---------------------------------------- Feature #17473: Make Pathname to embedded class of Ruby https://bugs.ruby-lang.org/issues/17473#change-114054 * Author: hsbt (Hiroshi SHIBATA) * Status: Closed * Assignee: akr (Akira Tanaka) ---------------------------------------- pathname is one of most useful utility class of Ruby. I'm happy to use Pathname without require it. Any thought? -- https://bugs.ruby-lang.org/
1 0
0 0
[ruby-core:122548] [Ruby Bug#21441] SEGV during thread cleanup if profiler calls thread_profiles_frames at wrong time
by luke-gru (Luke Gruber) 14 Jul '25

14 Jul '25
Issue #21441 has been reported by luke-gru (Luke Gruber). ---------------------------------------- Bug #21441: SEGV during thread cleanup if profiler calls thread_profiles_frames at wrong time https://bugs.ruby-lang.org/issues/21441 * Author: luke-gru (Luke Gruber) * Status: Open * ruby -v: 3.5.0 * Backport: 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: UNKNOWN ---------------------------------------- During thread cleanup, if a ruby sampling profiler calls `thread_profile_frames` at just the wrong time, the ec's stack is cleared but the CFP still exists on the EC, so `thread_profile_frames` assumes it can walk the stack and crashes. In `rb_ec_clear_vm_stack`, it should set `cfp` to `NULL` before clearing the stack. If during `rc_ec_clear_vm_stack` the process gets a signal and this thread handles it and calls `thread_profile_frames`, the early return check of `if (!cfp)` fails, it continues and crashes in this function. -- https://bugs.ruby-lang.org/
3 3
0 0
[ruby-core:122516] [Ruby Bug#21437] Date#hash may return different values for equal dates with large years
by Stranger6667 (Dmitry Dygalo) 14 Jul '25

14 Jul '25
Issue #21437 has been reported by Stranger6667 (Dmitry Dygalo). ---------------------------------------- Bug #21437: Date#hash may return different values for equal dates with large years https://bugs.ruby-lang.org/issues/21437 * Author: Stranger6667 (Dmitry Dygalo) * Status: Open * ruby -v: 3.2.8 - 3.4.4 (and older versions too) * Backport: 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: UNKNOWN ---------------------------------------- Parsing the same date string allocates new large integer objects with different pointer addresses, which then affects the hash value due to `d_lite_hash` behavior. ```ruby require 'date' # Small year - consistent hashes Date.strptime('2024-5-9', '%Y-%m-%d').hash #=> 3287407234087466140 Date.strptime('2024-5-9', '%Y-%m-%d').hash #=> 3287407234087466140 # BUG - Large year - different hashes for identical date strings Date.strptime('3171505571716611468830131104691-5-9', '%Y-%m-%d').hash #=> 3525034678868094350 Date.strptime('3171505571716611468830131104691-5-9', '%Y-%m-%d').hash #=> 2502076152602341316 # Different hash for same date! ``` In [ext/date/date_core.c](https://github.com/ruby/ruby/blob/v3_4_4/ext/date/dat…: ```c static VALUE d_lite_hash(VALUE self) { st_index_t v, h[4]; get_d1(self); h[0] = m_nth(dat); // Could be different for equal large integers // ... v = rb_memhash(h, sizeof(h)); return ST2FIX(v); } ``` Each call to `Date.strptime` with a large year allocates a new large integer for `m_nth(dat)`. The hash function uses this pointer address directly in `rb_memhash`, so equal dates parsed separately get different hashes. This breaks the hash contract that equal objects must have equal hashes. -- https://bugs.ruby-lang.org/
3 2
0 0
[ruby-core:122523] [Ruby Bug#21440] Cannot create instances of frozen Data subclasses
by jeremyevans0 (Jeremy Evans) 14 Jul '25

14 Jul '25
Issue #21440 has been reported by jeremyevans0 (Jeremy Evans). ---------------------------------------- Bug #21440: Cannot create instances of frozen Data subclasses https://bugs.ruby-lang.org/issues/21440 * Author: jeremyevans0 (Jeremy Evans) * Status: Open * Backport: 3.2: REQUIRED, 3.3: REQUIRED, 3.4: REQUIRED ---------------------------------------- This fails since Data was added in Ruby 3.2: ```ruby Class.new(Data.define(:a)).freeze.new # can't modify frozen #<Class:#<Class:0x000079cf41253160>>: #<Class:0x000079cf41253160> (FrozenError) ``` Note that the error occurs even before the ArgumentError due to the missing argument to `new`. This doesn't happen on classes created with `Data.define` (only subclasses of those classes): ```ruby Data.define(:a).freeze.new # missing keyword: :a (ArgumentError) ``` -- https://bugs.ruby-lang.org/
4 3
0 0
[ruby-core:122561] [Ruby Bug#21447] Fix handling of PM_CONSTANT_PATH_NODE node in keyword arguments with ARGS_SPLAT
by jeremyevans0 (Jeremy Evans) 14 Jul '25

14 Jul '25
Issue #21447 has been reported by jeremyevans0 (Jeremy Evans). ---------------------------------------- Bug #21447: Fix handling of PM_CONSTANT_PATH_NODE node in keyword arguments with ARGS_SPLAT https://bugs.ruby-lang.org/issues/21447 * Author: jeremyevans0 (Jeremy Evans) * Status: Open * Assignee: jeremyevans0 (Jeremy Evans) * Backport: 3.2: DONTNEED, 3.3: DONTNEED, 3.4: REQUIRED ---------------------------------------- I added an optimization to reduce implicit allocations when using parse.y in commit:3de20efc308cccc38bf9dacfffca6c626d039a06. An implementation was added for prism in commit:14bb376b79ca9140bfd36dbbad06be045f31f92e. Unfortunately, when I added tests for the optimization, I only tested the optimizable case for `NODE_COLON2` (`Foo::Bar`). I neglected to add a test for the unoptimizable case (`foo()::Bar`). The prism implementation of the optimization incorrectly optimized the unoptimizable case (for `PM_CONSTANT_PATH_NODE`), but that's because the tests did not fail when it was incorrectly optimized. This can cause an evaluation order issue in the following code if `foo` modifies `array`: ```ruby method(*array, kw: foo(array)::Bar) ``` I've submitted a PR that adds tests for the unoptimizable case, and fixes the prism implementation of the optimization: https://github.com/ruby/ruby/pull/13664 -- https://bugs.ruby-lang.org/
2 2
0 0
[ruby-core:122554] [Ruby Bug#21443] Backport: Fix heap-use-after-free in free_fast_fallback_getaddrinfo_entry
by rochlefebvre (Roch Lefebvre) 14 Jul '25

14 Jul '25
Issue #21443 has been reported by rochlefebvre (Roch Lefebvre). ---------------------------------------- Bug #21443: Backport: Fix heap-use-after-free in free_fast_fallback_getaddrinfo_entry https://bugs.ruby-lang.org/issues/21443 * Author: rochlefebvre (Roch Lefebvre) * Status: Open * ruby -v: ruby 3.4.4 (2025-05-14 revision a38531fd3f) +PRISM [arm64-darwin23] * Backport: 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: UNKNOWN ---------------------------------------- Please backport the following AddressSanitizer error into Ruby 3.4 https://github.com/ruby/ruby/pull/13231 I did not find a ticket related to the original fix. Thank you! -- https://bugs.ruby-lang.org/
3 2
0 0
  • ← Newer
  • 1
  • ...
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.