JRuby (please use github issues at http://bugs.jruby.org)
  1. JRuby (please use github issues at http://bugs.jruby.org)
  2. JRUBY-5964

Digest::Base#file does not handle Pathname as parameter when ran in 1.9

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: JRuby 1.6.4, JRuby 1.7.0.pre1
    • Component/s: None
    • Labels:
      None
    • Number of attachments :
      0

      Issue Links

        Activity

        Hide
        Joel Friedman added a comment -

        according to @headius this has been fixed in master.

        Show
        Joel Friedman added a comment - according to @headius this has been fixed in master.
        Hide
        Hiroshi Nakamura added a comment -

        Yes, JRUBY-4717

        % jruby --1.9 -rdigest -rpathname -e 'p Digest::MD5.new.file("build.xml")'
        #<Digest::MD5: b1bf0e480c527289d9801503448080c5>
        % jruby --1.9 -rdigest -rpathname -e 'p Digest::MD5.file("build.xml")' 
        #<Digest::MD5: b1bf0e480c527289d9801503448080c5>
        % ruby -rdigest -rpathname -e 'p Digest::MD5.file("build.xml")'    
        #<Digest::MD5: b1bf0e480c527289d9801503448080c5>
        
        Show
        Hiroshi Nakamura added a comment - Yes, JRUBY-4717 % jruby --1.9 -rdigest -rpathname -e 'p Digest::MD5.new.file("build.xml")' #<Digest::MD5: b1bf0e480c527289d9801503448080c5> % jruby --1.9 -rdigest -rpathname -e 'p Digest::MD5.file("build.xml")' #<Digest::MD5: b1bf0e480c527289d9801503448080c5> % ruby -rdigest -rpathname -e 'p Digest::MD5.file("build.xml")' #<Digest::MD5: b1bf0e480c527289d9801503448080c5>
        Hide
        Joel Friedman added a comment -

        Does this also work:

         % jruby --1.9 -rdigest -rpathname -e 'p Digest::MD5.new.file(Pathname.new("build.xml"))'
        
        Show
        Joel Friedman added a comment - Does this also work: % jruby --1.9 -rdigest -rpathname -e 'p Digest::MD5. new .file(Pathname. new ( "build.xml" ))'
        Hide
        Hiroshi Nakamura added a comment -

        Sorry, I forgot to include Pathname example... It does.

        % jruby --1.9 -rdigest -rpathname -ve 'p Digest::MD5.new.file(Pathname.new("build.xml"))'
        jruby 1.7.0.dev (ruby-1.9.2-p136) (2011-08-02 409c61f) (Java HotSpot(TM) 64-Bit Server VM 1.7.0) [linux-amd64-java]
        #<Digest::MD5: b1bf0e480c527289d9801503448080c5>
        
        Show
        Hiroshi Nakamura added a comment - Sorry, I forgot to include Pathname example... It does. % jruby --1.9 -rdigest -rpathname -ve 'p Digest::MD5.new.file(Pathname.new("build.xml"))' jruby 1.7.0.dev (ruby-1.9.2-p136) (2011-08-02 409c61f) (Java HotSpot(TM) 64-Bit Server VM 1.7.0) [linux-amd64-java] #<Digest::MD5: b1bf0e480c527289d9801503448080c5>
        Hide
        Hiroshi Nakamura added a comment -

        It will be fixed in both 1.7.x and 1.6.4.

        Show
        Hiroshi Nakamura added a comment - It will be fixed in both 1.7.x and 1.6.4.

          People

          • Assignee:
            Hiroshi Nakamura
            Reporter:
            Joel Friedman
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: