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

F1d6cc2b735bfd82c8773172da2aeab9?d=identicon&s=25 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
This topic is locked and can not be replied to.