Skip to content

Issue with keyword arguments in 3.1.0RC #5632

@catsidhe

Description

@catsidhe

I understand that handling of keyword arguments has changed for mruby 3.1 (to be aligned with CRuby/MRI?), however both Ruby 3.0 and 3.1 handle this code well. At the very least, I think the error message is confusing. What's happening here? On "stable" branch:

puts RUBY_VERSION
class A; def initialize(a: 0); end; end
class B < A; def initialize(a: 0); super(a: a); end; end
class C < B; def initialize(b = 0, a: 0); super(a: a); end; end
p C.new(1)
3.1
trace (most recent call last):
	[3] test.rb:5
	[2] test.rb:5:in new
	[1] test.rb:4:in initialize
test.rb:3:in initialize: can't convert Integer into Proc (TypeError)

Is this related to this recent merge by any chance? 696589c

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions