Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: JRuby 1.6.7, JRuby 1.7.0.pre1
-
Fix Version/s: JRuby 1.7.0.pre2
-
Component/s: None
-
Labels:None
-
Environment:OSX
-
Number of attachments :
Description
> touch TEST
> ln -s TEST TEST_SYMLINK
> jruby -rfileutils -e 'FileUtils.chmod(0, "TEST_SYMLINK")'
ArgumentError: wrong number of arguments (1 for 2)
check_have_lchmod? at /Users/xavier/.rvm/rubies/jruby-1.7.0.preview1/lib/ruby/1.9/fileutils.rb:1474
have_lchmod? at /Users/xavier/.rvm/rubies/jruby-1.7.0.preview1/lib/ruby/1.9/fileutils.rb:1467
chmod at /Users/xavier/.rvm/rubies/jruby-1.7.0.preview1/lib/ruby/1.9/fileutils.rb:1330
chmod at /Users/xavier/.rvm/rubies/jruby-1.7.0.preview1/lib/ruby/1.9/fileutils.rb:979
each at org/jruby/RubyArray.java:1611
chmod at /Users/xavier/.rvm/rubies/jruby-1.7.0.preview1/lib/ruby/1.9/fileutils.rb:978
(root) at -e:1
fileutils.rb:1474 looks weird to me. Why call the method with one argument after checking respond_to?
This case works on CRuby 1.9, even though docs specify 2 arguments: http://ruby-doc.org/core-1.9.3/File.html#method-c-lchmod
Maybe related to JRUBY-5747?
For reference, we hit this bug trying to install a gem that had a symlink in the bin directory.