From: "nobu (Nobuyoshi Nakada) via ruby-core" Date: 2024-02-07T16:35:43+00:00 Subject: [ruby-core:116621] [Ruby master Feature#20244] Show the conflicting another chdir block Issue #20244 has been reported by nobu (Nobuyoshi Nakada). ---------------------------------------- Feature #20244: Show the conflicting another chdir block https://bugs.ruby-lang.org/issues/20244 * Author: nobu (Nobuyoshi Nakada) * Status: Open * Priority: Normal ---------------------------------------- `Dir.chdir` is warning when in another `chdir` block. ```sh-session $ ruby -e 'Dir.chdir {' -e 'Dir.chdir("/")' -e '}' -e:2: warning: conflicting chdir during another chdir block ``` If two `chdir`s are far apart, it can be difficult to find conflicting blocks. To help the debugging, I propose to improve the warning message to show the conflicting block. ```sh-session $ ./ruby -e 'Dir.chdir {' -e 'Dir.chdir("/")' -e '}' -e:2: warning: conflicting chdir during another chdir block -e:1: warning: here ``` https://github.com/ruby/ruby/pull/9870 -- 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/