Difference in MRI and JRuby reporting of warnings
-------------------------------------------------
Key: JRUBY-871
URL: http://jira.codehaus.org/browse/JRUBY-871
Project: JRuby
Issue Type: Bug
Affects Versions: JRuby 0.9.9
Environment: r3540
Reporter: Eric Lindvall
Assignee: Thomas E Enebo
Priority: Minor
When running the following code:
{code:ruby}
def happy(&blk)
blk.call 1, 2, 3, 4
end
happy do |a|
puts a.inspect
end
{/code}
The following output is printed from MRI:
{code}
test.rb:6: warning: multiple values for a block parameter (4 for 1)
from test.rb:3
[1, 2, 3, 4]
{/code}
JRuby only prints:
{code}
test.rb:3 warning: multiple values for a block parameter (4 for 1)
[1, 2, 3, 4]
{/code}
Notice, MRI gives the context of "test.rb:6" and "test.rb:3", but JRuby only
reports "test.rb:3".
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email