... while it should properly raise a Ruby TypeError, such as with MRI:
ruby -rtime -e "Time.strptime(0, '%Y-%m-%d')"
time.rb:432:in `_strptime': no implicit conversion of Integer into String (TypeError)
ruby -rtime -e "Time.strptime(nil, '%Y-%m-%d')"
time.rb:432:in `_strptime': no implicit conversion of nil into String (TypeError)
JRuby (9.2.13.0) ends up with:
4: from org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:203)
3: from org.jruby.ext.date.RubyDate$INVOKER$s$_strptime.call(RubyDate$INVOKER$s$_strptime.gen)
2: from org.jruby.ext.date.RubyDate._strptime(RubyDate.java:1685)
1: from org.jruby.ext.date.RubyDate.parse(RubyDate.java:1691)
Java::JavaLang::ClassCastException (org.jruby.RubyNil cannot be cast to org.jruby.RubyString)
The text was updated successfully, but these errors were encountered:
... while it should properly raise a Ruby
TypeError
, such as with MRI:ruby -rtime -e "Time.strptime(0, '%Y-%m-%d')"
ruby -rtime -e "Time.strptime(nil, '%Y-%m-%d')"
JRuby (9.2.13.0) ends up with:
The text was updated successfully, but these errors were encountered: