Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with keyword arguments in 3.1.0RC #5632

Closed
catsidhe opened this issue Jan 11, 2022 · 1 comment
Closed

Issue with keyword arguments in 3.1.0RC #5632

catsidhe opened this issue Jan 11, 2022 · 1 comment

Comments

@catsidhe
Copy link

catsidhe commented Jan 11, 2022

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

@matz matz closed this as completed in 9f01272 Jan 12, 2022
@dearblue
Copy link
Contributor

@catsidhe @matz Thank you.

mimaki pushed a commit to mruby-Forum/mruby that referenced this issue Mar 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants