Project

General

Profile

Actions

Bug #8547

closed

FileUtils.chmod("a+r", "foobar", verbose: true) crashes

Added by gurgeous (Adam Doppelt) over 11 years ago. Updated over 7 years ago.

Status:
Third Party's Issue
Assignee:
-
Target version:
-
ruby -v:
ruby 2.0.0p195
Backport:
[ruby-core:55564]

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.


Related issues 1 (0 open1 closed)

Related to Backport200 - Backport #8633: backport r41853 (fix File.chmod error in :verbose mode)Closednagachika (Tomoyuki Chikanaga)07/13/2013Actions

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 :)

https://github.com/ruby/ruby/pull/329

Updated by nobu (Nobuyoshi Nakada) over 11 years ago

Seems there is no tests for module methods.

Actions #4

Updated by hsbt (Hiroshi SHIBATA) about 11 years ago

  • Status changed from Open to Feedback
Actions #5

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].

Actions #7

Updated by wanabe (_ wanabe) over 7 years ago

  • Related to Backport #8633: backport r41853 (fix File.chmod error in :verbose mode) added
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0