Project

General

Profile

Actions

Feature #20244

closed

Show the conflicting another chdir block

Added by nobu (Nobuyoshi Nakada) 11 months ago. Updated 9 months ago.

Status:
Closed
Assignee:
-
Target version:
-
[ruby-core:116621]

Description

Dir.chdir is warning when in another chdir block.

$ ruby -e 'Dir.chdir {' -e 'Dir.chdir("/")' -e '}'
-e:2: warning: conflicting chdir during another chdir block

If two chdirs 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.

$ ./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

Actions #1

Updated by nobu (Nobuyoshi Nakada) 9 months ago

  • Status changed from Open to Closed

Applied in changeset git|8fe86feecdcd0318c9ec88c10d2698beb9878bee.


[Feature #20244] Extract chdir_lock and its stuffs

Actions

Also available in: Atom PDF

Like1
Like0