Skip to content

Commit

Permalink
Merge pull request #798 from moofkit/non_symbol_keyword_arguments
Browse files Browse the repository at this point in the history
adds spec for non-symbol keyword argument
  • Loading branch information
andrykonchin authored Oct 12, 2020
2 parents 7a5bd53 + 2f331f1 commit 77041a3
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions language/method_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -600,6 +600,15 @@ def m(**k) k end
-> { m(2) }.should raise_error(ArgumentError)
end

ruby_version_is "2.7" do
evaluate <<-ruby do
def m(**k); k end;
ruby

m("a" => 1).should == { "a" => 1 }
end
end

evaluate <<-ruby do
def m(&b) b end
ruby
Expand Down

0 comments on commit 77041a3

Please sign in to comment.