ZeroDivisionError with DateTime strftime("%S")
----------------------------------------------

                 Key: JRUBY-5941
                 URL: https://jira.codehaus.org/browse/JRUBY-5941
             Project: JRuby
          Issue Type: Bug
    Affects Versions: JRuby 1.6.3, JRuby 1.7
            Reporter: John Firebaugh
            Assignee: Thomas E Enebo


{code}
$ 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
{code}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to