jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • JRuby
  • JRUBY-1298

parsedate followed by Time.gm(*res) throws ArrayIndexOutOfBoundsException (AIOOBE)

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: JRuby 1.0.1
  • Fix Version/s: JRuby 1.0.1, JRuby 1.1b1
  • Component/s: Core Classes/Modules
  • Labels:
    None
  • Environment:
    Linux caffe.sfbay.sun.com 2.6.22.1-32.fc6 #1 SMP Wed Aug 1 14:30:16 EDT 2007 x86_64 x86_64 x86_64 GNU/Linux

Description

$ jirb
irb(main):001:0> require 'parsedate'
=> true
irb(main):002:0> res = ParseDate.parsedate('Tue Aug 28 00:37:29 2007 -0700')
=> [2007, 8, 28, 0, 37, 29, nil, 2]
irb(main):003:0> date = Time.gm(*res)
NativeException: java.lang.ArrayIndexOutOfBoundsException: 5
from RubyTime.java:704:in `org.jruby.RubyTime.createTime'
from RubyTime.java:607:in `org.jruby.RubyTime.new_utc'
from null:-1:in `org.jruby.RubyTimeInvokerSnew_utcxx1.call'
from FastInvocationCallback.java:49:in `org.jruby.runtime.callback.FastInvocationCallback.execute'
from SimpleCallbackMethod.java:81:in `org.jruby.internal.runtime.methods.SimpleCallbackMethod.call'
from EvaluationState.java:571:in `org.jruby.evaluator.EvaluationState.callNode'
from EvaluationState.java:207:in `org.jruby.evaluator.EvaluationState.evalInternal'
from EvaluationState.java:773:in `org.jruby.evaluator.EvaluationState.dAsgnNode'
from EvaluationState.java:227:in `org.jruby.evaluator.EvaluationState.evalInternal'
from EvaluationState.java:1611:in `org.jruby.evaluator.EvaluationState.rootNode'
from EvaluationState.java:356:in `org.jruby.evaluator.EvaluationState.evalInternal'
from EvaluationState.java:164:in `org.jruby.evaluator.EvaluationState.eval'
from RubyObject.java:899:in `org.jruby.RubyObject.evalWithBinding'
from RubyKernel.java:801:in `org.jruby.RubyKernel.eval'
from null:-1:in `org.jruby.RubyKernelInvokerSevalxx1.call'
from InvocationCallback.java:49:in `org.jruby.runtime.callback.InvocationCallback.execute'
... 103 levels...
from Ruby.java:322:in `org.jruby.Ruby.compileOrFallbackAndRun'
from Main.java:229:in `org.jruby.Main.runInterpreter'
from Main.java:174:in `org.jruby.Main.runInterpreter'
from Main.java:120:in `org.jruby.Main.run'
from Main.java:95:in `org.jruby.Main.main'
from /opt/jruby-1.0.1/lib/ruby/1.8/irb.rb:150:in `eval_input'
from /opt/jruby-1.0.1/lib/ruby/1.8/irb.rb:70:in `signal_status'
from /opt/jruby-1.0.1/lib/ruby/1.8/irb.rb:147:in `eval_input'
from /opt/jruby-1.0.1/lib/ruby/1.8/irb.rb:70:in `each_top_level_statement'
from /opt/jruby-1.0.1/lib/ruby/1.8/irb.rb:146:in `loop'
from /opt/jruby-1.0.1/lib/ruby/1.8/irb.rb:146:in `catch'
from /opt/jruby-1.0.1/lib/ruby/1.8/irb.rb:146:in `eval_input'
from /opt/jruby-1.0.1/lib/ruby/1.8/irb.rb:70:in `start'
from :1:in `catch'
from /opt/jruby-1.0.1/lib/ruby/1.8/irb.rb:69:in `start'
from :1irb(main):004:0> [nf151384@caffe ~]$

Activity

  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Thomas E Enebo added a comment - 29/Aug/07 7:44 PM

Fixed in commit 4234 on trunk and commit 4236 on 1.0 branch. I also fixed some other errors when less than six arguments are provided.

Show
Thomas E Enebo added a comment - 29/Aug/07 7:44 PM Fixed in commit 4234 on trunk and commit 4236 on 1.0 branch. I also fixed some other errors when less than six arguments are provided.

People

  • Assignee:
    Thomas E Enebo
    Reporter:
    Nathan Fiedler
Vote (0)
Watch (0)

Dates

  • Created:
    29/Aug/07 6:12 PM
    Updated:
    22/Dec/07 6:28 AM
    Resolved:
    29/Aug/07 7:44 PM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.