truffleruby
truffleruby copied to clipboard
mail: all in test suite fails due to ArgumentError: wrong number of arguments (given 2, expected 1) in overriding Kernel.warn
The problem lies in overridden Kernel.warn in their spec/spec_helper.rb https://github.com/mikel/mail/blob/6bc16b4bce4fe280b19523c939b14a30e32
There is no issue with this on MRI. When the overridden Kernel.warn is removed, the test suite works (except several failures) on TruffleRuby as well.
To reproduce
git clone https://github.com/mikel/mail.git
cd mail
bundle
bundle exec rake
Thanks for the report. The link in the description is broken, but https://github.com/mikel/mail/blob/e054847e4e186290232a308246e1287be5f1fde7/spec/spec_helper.rb#L318 works.
Given that the commit adding the monkey patch is https://github.com/mikel/mail/commit/bf418912133d0aee5fdd9a5140fe5fb44cf4091f, I'd think it was never intended to override Kernel#warn.
I asked on the original PR: https://github.com/mikel/mail/pull/1105
A minimal reproduction for this is jt ruby -w -e 'module Kernel; def warn(m); $stderr.puts(m); end; end; p nil =~ "test" '.
I made a PR to the mail gem: https://github.com/mikel/mail/pull/1378
@deepj I believe you are welcome in the Ruby community. You are certainly welcome here on the TruffleRuby tracker. We value highly your reported issues. I would like to reopen them as they are still valid issues, would that be OK with you?
@deepj You are welcome on the TruffleRuby tracker. Your bugs are highly valued and they are valid, so I will reopen them. That way we can track them again, avoid duplicate bug reports, etc. Thank you for all your issue reports so far. We hope to see you discuss here soon again.
We have fixed this.