You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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).
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
The text was updated successfully, but these errors were encountered:
Just briefly looked at this. It appears like JIT is reusing a hash instance:
return_parse_impl(str,:_comp=>comp)
If in Java impl of _parse_impl I dup the second argument (the hash) then this runs to completion. What seems to be happening is that the same instance of the hash is being used and the parse mutates the hash given so next call will end up with an empty hash. I cannot seem to reproduce this outside of this exact case but I didn't spend much time on it.
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).Environment Information
Expected Behavior
No error
Actual Behavior
The text was updated successfully, but these errors were encountered: