Backport #8236

super & named parameters bug

Added by Marc-Andre Lafortune about 1 year ago. Updated 12 months ago.

[ruby-core:54094]
Status:Closed
Priority:Normal
Assignee:Tomoyuki Chikanaga

Description

=begin
class Base
def foo(*args)
p args
end
end

class A < Base
def foo(arg, bar: 'x')
super
end
end
A.new.foo 42 # => 42, {:bar=>"x"}

class B < Base
def foo(*args, bar: 'x')
super
end
end
B.new.foo 42 # => [42], [:bar, "x"]
=end

Associated revisions

Revision 40379
Added by Tomoyuki Chikanaga 12 months ago

merge revision(s) 40205: [Backport #8236]

* compile.c (iseq_compile_each): append keyword hash to argument array
  to splat if needed.   [Bug #8236]

History

#1 Updated by Nobuyoshi Nakada about 1 year ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

This issue was solved with changeset r40205.
Marc-Andre, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


compile.c: append keyword hash to splat

  • compile.c (iseqcompileeach): append keyword hash to argument array to splat if needed. [Bug #8236]

#2 Updated by Nobuyoshi Nakada about 1 year ago

  • Description updated (diff)

#3 Updated by Nobuyoshi Nakada about 1 year ago

  • Tracker changed from Bug to Backport
  • Project changed from ruby-trunk to Backport200
  • Category deleted (core)
  • Status changed from Closed to Assigned
  • Assignee set to Tomoyuki Chikanaga

#4 Updated by Tomoyuki Chikanaga 12 months ago

  • Status changed from Assigned to Closed

This issue was solved with changeset r40379.
Marc-Andre, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


merge revision(s) 40205: [Backport #8236]

* compile.c (iseq_compile_each): append keyword hash to argument array
  to splat if needed.   [Bug #8236]

Also available in: Atom PDF