1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Update specs to handle non-Symbols for keyword splats in 2.7

Also handle some warnings for behavior that will change in 3.0.
This commit is contained in:
Jeremy Evans 2019-08-17 22:49:04 -07:00
parent 16cd0de6ec
commit a810f6cbef
Notes: git 2019-08-31 04:40:14 +09:00
5 changed files with 362 additions and 134 deletions

View file

@ -175,7 +175,7 @@ describe "C-API Util function" do
it "raises an error if a required argument is not in the hash" do
h = { :a => 7, :c => 12, :b => 5 }
-> { @o.rb_get_kwargs(h, [:b, :d], 2, 0) }.should raise_error(ArgumentError, /missing keyword: d/)
-> { @o.rb_get_kwargs(h, [:b, :d], 2, 0) }.should raise_error(ArgumentError, /missing keyword: :?d/)
h.should == {:a => 7, :c => 12}
end
@ -187,7 +187,7 @@ describe "C-API Util function" do
it "raises an error if there are additional arguments and optional is positive" do
h = { :a => 7, :c => 12, :b => 5 }
-> { @o.rb_get_kwargs(h, [:b, :a], 2, 0) }.should raise_error(ArgumentError, /unknown keyword: c/)
-> { @o.rb_get_kwargs(h, [:b, :a], 2, 0) }.should raise_error(ArgumentError, /unknown keyword: :?c/)
h.should == {:c => 12}
end