Details

    • Type: Improvement Improvement
    • Status: Resolved Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: JRuby 1.7.0.pre1
    • Fix Version/s: JRuby 1.7.0.pre2
    • Component/s: Standard Library
    • Labels:
      None
    • Number of attachments :
      0

      Description

      irb(main):001:0> x=Time.new
      => 2012-08-03 08:51:56 -0400
      irb(main):002:0> x.round
      NoMethodError: undefined method `round' for 2012-08-03 08:51:56 -0400:Time
      	from (irb):2:in `evaluate'
      	from org/jruby/RubyKernel.java:1067:in `eval'
      	from org/jruby/RubyKernel.java:1392:in `loop'
      	from org/jruby/RubyKernel.java:1175:in `catch'
      	from org/jruby/RubyKernel.java:1175:in `catch'
      	from /usr/local/jruby/bin/jirb:13:in `(root)'
      

        Activity

        Hide
        Hiro Asari added a comment -

        I fixed this in 969bf6f, with a small caveat: one of the tests in MRI's Time#round tests does not pass. See https://github.com/jruby/jruby/blob/32e4ead431d53785d5b18949fd0c5bcece4c1e14/test/externals/ruby1.9/ruby/test_time.rb#L731-733

        So the tests for Time#round are not enabled yet.

        Show
        Hiro Asari added a comment - I fixed this in 969bf6f, with a small caveat: one of the tests in MRI's Time#round tests does not pass. See https://github.com/jruby/jruby/blob/32e4ead431d53785d5b18949fd0c5bcece4c1e14/test/externals/ruby1.9/ruby/test_time.rb#L731-733 So the tests for Time#round are not enabled yet.
        Hide
        Hiro Asari added a comment -

        I note here that the failing test exercises the 4th digit of Time#subsec, the precision for which JVM doesn't have the support mechanism.

        Show
        Hiro Asari added a comment - I note here that the failing test exercises the 4th digit of Time#subsec , the precision for which JVM doesn't have the support mechanism.

          People

          • Assignee:
            Hiro Asari
            Reporter:
            Hiro Asari
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: