-
-
Notifications
You must be signed in to change notification settings - Fork 942
Closed
Milestone
Description
Environment
$ jruby -v
jruby 9.2.8.0 (2.5.3) 2019-08-12 a1ac7ff OpenJDK 64-Bit Server VM 13+33 on 13+33 +jit [darwin-x86_64]
$ uname -a
Darwin mb204.fidor.loc 18.7.0 Darwin Kernel Version 18.7.0: Tue Aug 20 16:57:14 PDT 2019; root:xnu-4903.271.2~2/RELEASE_X86_64 x86_64 i386 MacBookPro15,1 DarwinExpected Behavior
The script
S = Class.new(String)
warn S.new("foo")
warn S.new(<<M)
bar
Mis expected to output
foo
bar
to stderr.
Actual Behavior
Instead JRuby raises a TypeError for the second warning (heredoc case):
foo
TypeError: wrong argument type S (expected String)
warn at org/jruby/common/RubyWarnings.java:224
<main> at jruby-bug.rb:4
This was originally observed with the rainbow gem (https://github.com/sickill/rainbow) here: https://circleci.com/gh/rubocop-hq/rubocop/72166
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels