You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
I was recently bitten by the issue that Dir.chdir (including with a block) actually affects the process (rather than somehow being local to the ruby thread ) and thus is non threadsafe.
Describe the solution you'd like
A built in cop to ban Dir.chdir.
Ruby 3.0 throws an error if you try to chdir within another chdir (from another thread) https://bugs.ruby-lang.org/issues/15661
Is your feature request related to a problem? Please describe.
I was recently bitten by the issue that Dir.chdir (including with a block) actually affects the process (rather than somehow being local to the ruby thread ) and thus is non threadsafe.
Describe the solution you'd like
A built in cop to ban Dir.chdir.
Ruby 3.0 throws an error if you try to chdir within another chdir (from another thread) https://bugs.ruby-lang.org/issues/15661
Describe alternatives you've considered
It's possible to use this code more or less as is: https://gist.github.com/masutaka/68d372b7f7910f552eeb215bb2e5d3cc
but think it would be good to have it built in. Thoughts?
The text was updated successfully, but these errors were encountered: