From: "gurgeous (Adam Doppelt)" <amd@...>
Date: 2013-06-20T13:04:56+09:00
Subject: [ruby-core:55564] [ruby-trunk - Bug #8547][Open] FileUtils.chmod("a+r", "foobar", verbose: true) crashes


Issue #8547 has been reported by gurgeous (Adam Doppelt).

----------------------------------------
Bug #8547: FileUtils.chmod("a+r", "foobar", verbose: true) crashes
https://bugs.ruby-lang.org/issues/8547

Author: gurgeous (Adam Doppelt)
Status: Open
Priority: Normal
Assignee: 
Category: 
Target version: 
ruby -v: ruby 2.0.0p195
Backport: 1.9.3: UNKNOWN, 2.0.0: UNKNOWN


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.


-- 
http://bugs.ruby-lang.org/