Skip to content

Commit

Permalink
Add regression spec for #4168
Browse files Browse the repository at this point in the history
  • Loading branch information
enebo committed Sep 28, 2016
1 parent 7b93e08 commit 18800ed
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions spec/regression/GH-4186.rb
@@ -0,0 +1,9 @@
# This is not really ruby/spec worthy as it is a weird internal mistake on
# our part in checking all variables.

describe "#4186 JRuby accepts wrong method arguments when mixing positional with defaults and keywords" do
it "complains about missing required kwarg" do
def gh4186(a=1, b:); end
expect { gh4186(a: 2, b: 3) }.to raise_error(ArgumentError)
end
end

0 comments on commit 18800ed

Please sign in to comment.