Skip to content

Pathname#dup is broken in 1.7.5. #1209

@mbj

Description

@mbj

Today I tried to update some of my app to 1.7.5. But this bug had been introduced:

[mbj@mbj ~]$ java -version
java version "1.7.0_25"
Java(TM) SE Runtime Environment (build 1.7.0_25-b15)
Java HotSpot(TM) 64-Bit Server VM (build 23.25-b01, mixed mode)
[mbj@mbj ~]$ ruby -v
jruby 1.7.5 (1.9.3p392) 2013-10-07 74e9291 on Java HotSpot(TM) 64-Bit Server VM 1.7.0_25-b15 [linux-amd64]
[mbj@mbj ~]$ ruby -r pathname -e 'pathname = Pathname.new("foo"); p pathname.dup' 
<Pathname:null>
[mbj@mbj ~]$ ruby -r pathname -e 'pathname = Pathname.new("foo"); p pathname.dup.to_s' 
RubyPathname.java:306:in `to_s': java.lang.NullPointerException
        from RubyPathname$INVOKER$i$0$0$to_s.gen:-1:in `call'
        from CachingCallSite.java:306:in `cacheAndCall'
        from CachingCallSite.java:136:in `call'
        from -e:1:in `__file__'
        from -e:-1:in `load'
        from Ruby.java:814:in `runScript'
        from Ruby.java:807:in `runScript'
        from Ruby.java:676:in `runNormally'
        from Ruby.java:525:in `runFromMain'
        from Main.java:395:in `doRunFromMain'
        from Main.java:290:in `internalRun'
        from Main.java:217:in `run'
        from Main.java:197:in `main'

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions