Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: JRuby 1.4
    • Fix Version/s: JRuby 1.5
    • Component/s: Core Classes/Modules
    • Labels:
      None
    • Number of attachments :
      0

      Description

      This has been reported in #rubyspec IRC channel:

      #>jruby -rdigest -e "p Digest::MD5.file('TODO')"
      -e:1: undefined method `file' for Digest::MD5:Class (NoMethodError)
      
      #>jruby -rdigest -e "p Digest::MD5.new.file('TODO')"
      -e:1: undefined method `file' for #<Digest::MD5: d41d8cd98f00b204e9800998ecf8427e> (NoMethodError)
      

      Fix is coming.

        Activity

        Hide
        Vladimir Sizikov added a comment -

        Fixed in rev. 8b0c286 on master branch.

        Show
        Vladimir Sizikov added a comment - Fixed in rev. 8b0c286 on master branch.
        Vladimir Sizikov made changes -
        Field Original Value New Value
        Resolution Fixed [ 1 ]
        Status Open [ 1 ] Resolved [ 5 ]
        Charles Oliver Nutter made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Hide
        Hiroshi Nakamura added a comment -

        For a record, I changed the implementation later (for jruby 1.6.4) to use lib/digest.rb

        commit a432afe65c2cb2b920c7ff1b0ba3c920c64be126
        Author: Hiroshi Nakamura <nahi@ruby-lang.org>
        Date:   Tue Aug 2 11:18:02 2011 +0900
        
            JRUBY-4717: Import digest.rb from CRuby stdlib.
            
            I broke digest lib for 1.8 at 51bf9d9f and Nick fixed it at 288ef4ae.
            And this is a new try for re-fixing digest library for JRUBY-4717.
            
             * Update tool/globals_1_8_7.rb to import digest.rb for 1.8 as same as
               1.9.
             * Remove Java implementation of Digest.const_missing. It's defined in
               lib/digest.rb for both 1.8 and 1.9.
             * Revert 288ef1ae. It does not mean that 288ef4ae is wrong. It's
               51bf9d9f which should be fixed and needs above fixes. 288ef4ae was
               needed.
            
            With importing lib/digest.rb for 1.8 mode, Digest function start working
            for 1.8 as same as CRuby.
            
            % ruby187 -rdigest -e 'p Digest("SHA2")'
            Digest::SHA2
            
            % jruby -rdigest -e 'p Digest("SHA2")'
            Digest::SHA2
            
            % jruby163 -rdigest -e 'p Digest("SHA2")'
            NoMethodError: undefined method `Digest' for main:Object
              (root) at -e:1
        
        Show
        Hiroshi Nakamura added a comment - For a record, I changed the implementation later (for jruby 1.6.4) to use lib/digest.rb commit a432afe65c2cb2b920c7ff1b0ba3c920c64be126 Author: Hiroshi Nakamura <nahi@ruby-lang.org> Date: Tue Aug 2 11:18:02 2011 +0900 JRUBY-4717: Import digest.rb from CRuby stdlib. I broke digest lib for 1.8 at 51bf9d9f and Nick fixed it at 288ef4ae. And this is a new try for re-fixing digest library for JRUBY-4717. * Update tool/globals_1_8_7.rb to import digest.rb for 1.8 as same as 1.9. * Remove Java implementation of Digest.const_missing. It's defined in lib/digest.rb for both 1.8 and 1.9. * Revert 288ef1ae. It does not mean that 288ef4ae is wrong. It's 51bf9d9f which should be fixed and needs above fixes. 288ef4ae was needed. With importing lib/digest.rb for 1.8 mode, Digest function start working for 1.8 as same as CRuby. % ruby187 -rdigest -e 'p Digest("SHA2")' Digest::SHA2 % jruby -rdigest -e 'p Digest("SHA2")' Digest::SHA2 % jruby163 -rdigest -e 'p Digest("SHA2")' NoMethodError: undefined method `Digest' for main:Object (root) at -e:1

          People

          • Assignee:
            Vladimir Sizikov
            Reporter:
            Vladimir Sizikov
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: