Details

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

      Description

      $ rvm exec ruby -v -rdate -e 'puts DateTime.civil(1880, 2, 28, 15, 15, 10, -0.25).strftime("%S")'
      jruby 1.6.3 (ruby-1.9.2-p136) (2011-07-07 965162f) (Java HotSpot(TM) Client VM 1.6.0_26) [darwin-i386-java]
      ZeroDivisionError: divided by 0
                      divmod at org/jruby/RubyFloat.java:428
        day_fraction_to_time at /Users/john/.rvm/rubies/jruby-1.6.3/lib/ruby/1.9/date.rb:518
                        time at /Users/john/.rvm/rubies/jruby-1.6.3/lib/ruby/1.9/date.rb:1207
                        time at (eval):4
                         sec at /Users/john/.rvm/rubies/jruby-1.6.3/lib/ruby/1.9/date.rb:1219
                    strftime at /Users/john/.rvm/rubies/jruby-1.6.3/lib/ruby/1.9/date/format.rb:278
                        gsub at org/jruby/RubyString.java:2853
                    strftime at /Users/john/.rvm/rubies/jruby-1.6.3/lib/ruby/1.9/date/format.rb:216
                    strftime at /Users/john/.rvm/rubies/jruby-1.6.3/lib/ruby/1.9/date/format.rb:1282
                      (root) at -e:1
      jruby 1.7.0.dev (ruby-1.9.2-p136) (2011-07-23 a7410e1) (Java HotSpot(TM) Client VM 1.6.0_26) [darwin-i386-java]
      ZeroDivisionError: divided by 0
                      divmod at org/jruby/RubyFloat.java:428
        day_fraction_to_time at /Users/john/.rvm/rubies/jruby-head/lib/ruby/1.9/date.rb:518
                        time at /Users/john/.rvm/rubies/jruby-head/lib/ruby/1.9/date.rb:1207
                        time at (eval):4
                         sec at /Users/john/.rvm/rubies/jruby-head/lib/ruby/1.9/date.rb:1219
                    strftime at /Users/john/.rvm/rubies/jruby-head/lib/ruby/1.9/date/format.rb:278
                        gsub at org/jruby/RubyString.java:2857
                    strftime at /Users/john/.rvm/rubies/jruby-head/lib/ruby/1.9/date/format.rb:216
                    strftime at /Users/john/.rvm/rubies/jruby-head/lib/ruby/1.9/date/format.rb:1282
                      (root) at -e:1
      ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-darwin10.8.0]
      10
      

        Activity

        Hide
        Charles Oliver Nutter added a comment -

        Our stdlib should be fairly current, so this probably boils down to a core class incompatibility. Looking to see if I can find it in five minutes.

        Show
        Charles Oliver Nutter added a comment - Our stdlib should be fairly current, so this probably boils down to a core class incompatibility. Looking to see if I can find it in five minutes.
        Hide
        Charles Oliver Nutter added a comment -

        Fixed. RubyRational did not override getDoubleValue from RubyNumeric, so it was already returning 0.

        master = 01ab195, jruby-1_6 = 422b6c7.

        Show
        Charles Oliver Nutter added a comment - Fixed. RubyRational did not override getDoubleValue from RubyNumeric, so it was already returning 0. master = 01ab195, jruby-1_6 = 422b6c7.

          People

          • Assignee:
            Charles Oliver Nutter
            Reporter:
            John Firebaugh
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: