Bug #8547
closedFileUtils.chmod("a+r", "foobar", verbose: true) crashes
Description
To reproduce in IRB:
require "fileutils" ; FileUtils.chmod("a+r", "foobar", verbose: true)
Here's the stack:
NoMethodError: undefined method mode_to_s' for FileUtils:Module from ~/.rbenv/versions/2.0.0-p195/lib/ruby/2.0.0/fileutils.rb:970:in
chmod'
This ONLY crashes with :verbose. If you leave off :verbose it skips the call to mode_to_s, so there's no crash.
Updated by nagachika (Tomoyuki Chikanaga) over 11 years ago
- Backport changed from 1.9.3: UNKNOWN, 2.0.0: UNKNOWN to 1.9.3: DONTNEED, 2.0.0: REQUIRED
Updated by robotmay (Robert May) over 11 years ago
I submitted a pull request on the GitHub mirror which fixes the issue. Whether it's the correct fix I can't be certain, as I've not submitted code to Ruby core before :)
Updated by nobu (Nobuyoshi Nakada) over 11 years ago
Seems there is no tests for module methods.
Updated by hsbt (Hiroshi SHIBATA) almost 11 years ago
- Status changed from Open to Feedback
Updated by k0kubun (Takashi Kokubun) over 7 years ago
- Status changed from Feedback to Third Party's Issue
- Backport deleted (
1.9.3: DONTNEED, 2.0.0: REQUIRED)
It seems that original issue is resolved https://github.com/gurgeous/teleport/issues/22.
Updated by wanabe (_ wanabe) over 7 years ago
I guess it was fixed at r41853 before v2_1_0_preview1 and backported to ruby2_0_0 at r41946 [Backport #8633].
Updated by wanabe (_ wanabe) over 7 years ago
- Related to Backport #8633: backport r41853 (fix File.chmod error in :verbose mode) added