summaryrefslogtreecommitdiff
path: root/spec/ruby/optional
diff options
context:
space:
mode:
authorJeremy Evans <code@jeremyevans.net>2019-08-17 22:49:04 -0700
committerJeremy Evans <code@jeremyevans.net>2019-08-30 12:39:31 -0700
commita810f6cbefb5726c626b0c490522865588f4480e (patch)
tree83bc883b724e75976a155578c667276d10220450 /spec/ruby/optional
parent16cd0de6ec8464129041c52174f5608e32512ca1 (diff)
Update specs to handle non-Symbols for keyword splats in 2.7
Also handle some warnings for behavior that will change in 3.0.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/2395
Diffstat (limited to 'spec/ruby/optional')
-rw-r--r--spec/ruby/optional/capi/util_spec.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/ruby/optional/capi/util_spec.rb b/spec/ruby/optional/capi/util_spec.rb
index cd6c1105e2..ee48e2e0ea 100644
--- a/spec/ruby/optional/capi/util_spec.rb
+++ b/spec/ruby/optional/capi/util_spec.rb
@@ -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