assignment in a method with default argument strip off other arguments.
-----------------------------------------------------------------------
Key: JRUBY-5773
URL: http://jira.codehaus.org/browse/JRUBY-5773
Project: JRuby
Issue Type: Bug
Components: Compiler
Affects Versions: JRuby 1.6.1
Environment: Fedora 14 (64bit) and Mac OSX 10.6.7
Reporter: Chung Shin Yee
Priority: Minor
The following code segment shows that the assignment c = 30 will result in the
argument b being stripped off to become nil.
$ jruby --1.9 -S jirb
irb(main):001:0> def work(a = 10, b)
irb(main):002:1> puts a.inspect
irb(main):003:1> puts b.inspect
irb(main):004:1> c = 30
irb(main):005:1> end
=> nil
irb(main):006:0> work(20, 25)
20
nil
=> 30
--
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