Forum: Ruby-core [ruby-trunk - Bug #7665][Assigned] keyrest argument overwrites the last element of rest argument

Posted by Nobuyoshi Nakada (nobu)
on 2013-01-07 03:58
(Received via mailing list)
Issue #7665 has been reported by nobu (Nobuyoshi Nakada).

----------------------------------------
Bug #7665: keyrest argument overwrites the last element of rest argument
https://bugs.ruby-lang.org/issues/7665

Author: nobu (Nobuyoshi Nakada)
Status: Assigned
Priority: High
Assignee: nobu (Nobuyoshi Nakada)
Category: core
Target version: 2.0.0
ruby -v: r38718


=begin
Since r38657, this code
  def foo(*args, **opt)
    p args, opt
  end

  foo("foo", "bar", zzz: 42)

shows
  ["foo", {:zzz=>42}]
  {:zzz=>42}

but the first line should be (({["foo", "bar"]})).
=end
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.