-
-
Notifications
You must be signed in to change notification settings - Fork 942
Closed
Milestone
Description
Environment Information
$ jruby -v
jruby 9.4.0.0 (3.1.0) 2022-11-23 95c0ec159f OpenJDK 64-Bit Server VM 17.0.2+0 on 17.0.2+0 +jit [arm64-darwin]$ uname -a
Darwin Jankos-MacBook-Air.local 22.1.0 Darwin Kernel Version 22.1.0: Sun Oct 9 20:14:30 PDT 2022; root:xnu-8792.41.9~2/RELEASE_ARM64_T8103 arm64Expected Behavior
When I execute the following script, I expect it to execute without errors, as it does on Ruby 3.1:
class Foo
def meth(arg:)
end
end
class Bar < Foo
def meth(arg:)
something { super }
end
def something
yield
end
end
Bar.new.meth(arg: "foo")Actual Behavior
However, I get an error instead:
ArgumentError: missing keyword: arg
meth at program.rb:2
meth at program.rb:8
something at program.rb:12
meth at program.rb:8
<main> at program.rb:16
... 6 levels...
They key combination is inheritance plus a method that yields and calls super without arguments. If I remove something and just call super directly, the error doesn't happen.
This error happened originally in the Shrine test suite.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels