Details
-
Type:
Bug
-
Status:
Reopened
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: JRuby 1.5.6, JRuby 1.6.7
-
Fix Version/s: JRuby 1.7.4
-
Component/s: Parser, Ruby 1.9.2
-
Labels:None
-
Number of attachments :
Description
The new method signature causes MiniTest doesn't handle default arguments properly. I've reduced the issue to this code:
require 'minitest/unit' module Foo include MiniTest::Assertions def assert(test, msg = (nomsg = true; nil)) super end end include Foo assert 'foo' == '', 'expected blank'
The expected output is:
`assert': expected blank (MiniTest::Assertion)
but I get the MiniTest default message:
`assert': Failed assertion, no message given. (MiniTest::Assertion)
The signature of the assert above is the same that TestUnit has for Ruby 1.9 and that causes ActiveSupport tests fail:
https://github.com/jruby/jruby/blob/master/lib/ruby/1.9/test/unit/assertions.rb#L13
If I remove the "nomsg = true" parameter it works fine.