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
$ jruby -v
jruby 9.0.5.0 (2.2.3) 2016-01-26 7bee00d OpenJDK 64-Bit Server VM 25.66-b17 on 1.8.0_66-internal-b17 +indy +jit [linux-amd64]
$ uname -a
Linux x220 4.2.0-35-generic #40-Ubuntu SMP Tue Mar 15 22:15:45 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
Expected Behavior
When calling Time.parse in MRI, it coerces the object into a String. For instance, in the syslog-parser code, it passes an object that can be coerced into a string and expects it to work.
In JRuby 9.0.5.0, it doesn't coerce the argument passed in.
$ jruby test_time.rb
NoMethodError: undefined method `gsub!' for #<Foo:0x305fd85d> _parse at /home/hone/.rvm/rubies/jruby-9.0.5.0/lib/ruby/stdlib/date/format.rb:841 parse at /home/hone/.rvm/rubies/jruby-9.0.5.0/lib/ruby/stdlib/time.rb:361 <top> at test_time.rb:9
This fix was to modify our still pure-Ruby version of date/format.rb. MRI has converted this to a native C ext which likely means there might be some other new features we have not kept track of.
Environment
Expected Behavior
When calling
Time.parse
in MRI, it coerces the object into aString
. For instance, in the syslog-parser code, it passes an object that can be coerced into a string and expects it to work.Here's a simple repro case:
Actual Behavior
In JRuby
9.0.5.0
, it doesn't coerce the argument passed in./cc @jkutner
The text was updated successfully, but these errors were encountered: