From: "hsbt (Hiroshi SHIBATA) via ruby-core" Date: 2026-01-16T01:45:35+00:00 Subject: [ruby-core:124568] [Ruby Feature#21766] Pathname + FileUtils making sweet music together Issue #21766 has been updated by hsbt (Hiroshi SHIBATA). Status changed from Open to Rejected https://github.com/ruby/pathname/issues/64 is closed now. > it seems to be OK for a library like fileutils to be aware of it and extend it? I prefer this proposal. I think it would be better to do the same for Pathname methods that are not available at core class, but I haven't fully sorted out the issues yet. We should be discussed in a separate ticket. ---------------------------------------- Feature #21766: Pathname + FileUtils making sweet music together https://bugs.ruby-lang.org/issues/21766#change-116142 * Author: gurgeous (Adam Doppelt) * Status: Rejected ---------------------------------------- I love Pathname. I love FileUtils. Let's bring these two classes EVEN CLOSER TOGETHER by adding some tragically missing helpers. Something like this, perhaps? ``` ruby class Pathname def mkdir_p(...) = FileUtils.mkdir_p(@path, ...) def ln(...) = FileUtils.ln(@path, ...) def ln_s(...) = FileUtils.ln_s(@path, ...) def ln_sf(...) = FileUtils.ln_sf(@path, ...) def cp(...) = FileUtils.cp(@path, ...) def cp_r(...) = FileUtils.cp_r(@path, ...) def mv(...) = FileUtils.mv(@path, ...) def rm(...) = FileUtils.rm(@path, ...) def rm_r(...) = FileUtils.rm_r(@path, ...) def rm_rf(...) = FileUtils.rm_rf(@path, ...) end ``` There are some concerns about making pathname.rb more dependent on FileUtils, which I understand. What's the best way forward? Let's do it! (also see https://github.com/ruby/pathname/issues/64 and https://github.com/ruby/pathname/issues/72) -- 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/lists/ruby-core.ml.ruby-lang.org/