Skip to content

Pathname#delete alias missing / not working #1201

@Mange

Description

@Mange

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions