-
-
Notifications
You must be signed in to change notification settings - Fork 942
Closed
Milestone
Description
Environment
jruby 9.2.8.0 (2.5.3) 2019-08-12 a1ac7ff OpenJDK 64-Bit Server VM 25.222-b10 on 1.8.0_222-b10 +jit [OpenBSD-x86_64]
OpenBSD foo.local 6.5 GENERIC.MP#171 amd64
This is unlikely to be operating system dependent, and does not involve gems or environment variables.
Expected Behavior
$ ruby25 -ve 'warn({}); warn("a", {}); warn(Class.new{def to_s; "foo" end}.new, :uplevel=>0)'
ruby 2.5.6p201 (2019-08-28 revision 67796) [x86_64-openbsd]
a
-e:1: warning: foo
Actual Behavior
$ jruby -ve 'warn({}); warn("a", {}); warn(Class.new{def to_s; "foo" end}.new, :uplevel=>0)'
jruby 9.2.8.0 (2.5.3) 2019-08-12 a1ac7ff OpenJDK 64-Bit Server VM 25.222-b10 on 1.8.0_222-b10 +jit [OpenBSD-x86_64]
{}
-e:1: warning: a
TypeError: no implicit conversion of #<Class:0x17d677df> into String
+ at org/jruby/RubyString.java:1181
<main> at -e:1
At least three separate issues:
warn({}): Single hash argument is not treated as an option hash.warn("a", {}): Empty option hash treated as uplevel 0 instead of no uplevel.warn(Class.new{def to_s; "foo" end}.new, :uplevel=>0): No conversion of object to string using to_s if uplevel is provided.
Reactions are currently unavailable