From: "jeremyevans0 (Jeremy Evans) via ruby-core" Date: 2023-12-11T22:30:48+00:00 Subject: [ruby-core:115708] [Ruby master Misc#20056] Dir#chdir inconsistency with Dir.chdir Issue #20056 has been updated by jeremyevans0 (Jeremy Evans). zverok (Victor Shepelev) wrote in #note-9: > Or do you plan the deeper refactoring soon? Yes. I'll work on a pull request tonight. The refactoring necessary is not extensive. ---------------------------------------- Misc #20056: Dir#chdir inconsistency with Dir.chdir https://bugs.ruby-lang.org/issues/20056#change-105639 * Author: zverok (Victor Shepelev) * Status: Open * Priority: Normal * Assignee: jeremyevans0 (Jeremy Evans) ---------------------------------------- I am not sure it is important; I just wanted to understand if this is intentional or accidental. 1. There is no block form for `Dir#chdir`, unlike `Dir.chdir` (the form that will return to the previous directory when the block is finished) 2. `Dir.chdir` returns `0`, while `Dir#chdir` returns `nil` (both seem to be not representing any particular internal value, just a hardcoded return value). -- 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/