$ 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.
The text was updated successfully, but these errors were encountered:
Environment
This is unlikely to be operating system dependent, and does not involve gems or environment variables.
Expected Behavior
Actual Behavior
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.The text was updated successfully, but these errors were encountered: