From: "colorbox (box color)" Date: 2022-11-28T09:35:30+00:00 Subject: [ruby-core:111035] [Ruby master Misc#19155] documentation of Pathname#join with absolute path Issue #19155 has been reported by colorbox (box color). ---------------------------------------- Misc #19155: documentation of Pathname#join with absolute path https://bugs.ruby-lang.org/issues/19155 * Author: colorbox (box color) * Status: Open * Priority: Normal ---------------------------------------- Pathname#join ignores previous directory name before absolute path Is this intentional? ```irb irb(main):002:0> require 'pathname' => true irb(main):003:0> Pathname('/foo').join('bar', 'baz') => # irb(main):004:0> Pathname('/foo').join('bar', '/baz') => # irb(main):005:0> ������ ruby -v ruby 3.0.4p208 (2022-04-12 revision 3fa771dded) [x86_64-darwin19] ``` I found that this behavior is intentional from test code but I cannot found reason. https://github.com/ruby/pathname/blob/master/test/pathname/test_pathname.rb#L248-L261 There was no description of this behavior in the documentation. -- https://bugs.ruby-lang.org/ ______________________________________________ ruby-core mailing list -- ruby-core@ml.ruby-lang.org To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/