Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pathname#delete alias missing / not working #1201

Closed
Mange opened this Issue Nov 5, 2013 · 2 comments

Comments

Projects
None yet
2 participants
@Mange
Copy link

Mange commented Nov 5, 2013

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

@enebo enebo closed this in f196b81 Nov 5, 2013

@enebo

This comment has been minimized.

Copy link
Member

enebo commented Nov 5, 2013

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

@Mange

This comment has been minimized.

Copy link
Author

Mange commented Nov 5, 2013

Thanks! :-)

Den tisdagen den 5:e november 2013 skrev Thomas E Enebo:

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


Reply to this email directly or view it on GitHubhttps://github.com//issues/1201#issuecomment-27783165
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.