Project

General

Profile

Actions

Backport #8236

closed

super & named parameters bug

Added by marcandre (Marc-Andre Lafortune) almost 11 years ago. Updated almost 11 years ago.


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"}] (ok)

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

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0