Skip to content

Date::Error with Date.parse and JRuby 10 #8782

@ankane

Description

@ankane

Hi, the following code throws a Date::Error: Invalid date after around 80 iterations on my machine with JRuby 10 (and no error with 9.4.12.0 or CRuby).

require "date"

1000.times do
  p Date.parse("01-Jan-1995")
end

Environment Information

  • jruby 10.0.0.0 (3.4.2) 2025-04-13 6ed59bc OpenJDK 64-Bit Server VM 21.0.6 on 21.0.6 +indy +jit [arm64-darwin]
  • macOS 15.4.1 arm64

Expected Behavior

No error

Actual Behavior

Date::Error: invalid date
  new_by_frags at /Users/andrew/.rbenv/versions/jruby-10.0.0.0/lib/ruby/stdlib/date.rb:450
         parse at /Users/andrew/.rbenv/versions/jruby-10.0.0.0/lib/ruby/stdlib/date.rb:492

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions