Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Pathname#delete alias missing / not working #1201

Closed
Mange opened this Issue · 2 comments

2 participants

Magnus Bergmark Thomas E Enebo
Magnus Bergmark

Pathname#delete (alias to Pathname#unlink) is missing from JRuby 1.7.5.

JRuby 1.7.5: (Actual)

jruby-1.7.5 :001 > require 'pathname'
 => true
jruby-1.7.5 :002 > Pathname.new("/tmp/dwwddwdwwd").delete
NoMethodError: undefined method `delete' for <Pathname:/tmp/dwwddwdwwd>:Pathname
    from (irb):2:in `evaluate'
    from org/jruby/RubyKernel.java:1121:in `eval'
    from org/jruby/RubyKernel.java:1517:in `loop'
    from org/jruby/RubyKernel.java:1282:in `catch'
    from org/jruby/RubyKernel.java:1282:in `catch'
    from /Users/mange/.rvm/rubies/jruby-1.7.5/bin/irb:13:in `(root)'

MRI 1.9.3: (Expected)

1.9.3p194 :001 > require 'pathname'
 => true
1.9.3p194 :002 > Pathname.new("/tmp/dwwddwdwwd").delete
Errno::ENOENT: No such file or directory - /tmp/dwwddwdwwd
    from (irb):2:in `unlink'
    from (irb):2:in `delete'
    from (irb):2
    from /Users/mange/.rvm/rubies/ruby-1.9.3-p194/bin/irb:16:in `<main>'

MRI 2.0.0: (Expected)

2.0.0p247 :001 > require 'pathname'
 => true
2.0.0p247 :002 > Pathname.new("/tmp/dwwddwdwwd").delete
Errno::ENOENT: No such file or directory - /tmp/dwwddwdwwd
    from (irb):2:in `unlink'
    from (irb):2:in `delete'
    from (irb):2
    from /Users/mange/.rvm/rubies/ruby-2.0.0-p247/bin/irb:13:in `<main>'

The #unlink method works the way it should.


jruby --version : jruby 1.7.5 (1.9.3p392) 2013-10-07 74e9291 on Java HotSpot(TM) 64-Bit Server VM 1.7.0_09-b05 [darwin-x86_64]

uname -a : Darwin Lilith.local 13.0.0 Darwin Kernel Version 13.0.0: Thu Sep 19 22:22:27 PDT 2013; root:xnu-2422.1.72~6/RELEASE_X86_64 x86_64 i386 iMac11,3 Darwin

Thomas E Enebo enebo closed this in f196b81
Thomas E Enebo
Owner

Your title was right on...we did not define the alias for delete to unlink. Thanks for reporting this.

Magnus Bergmark
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.