From 534507f8657a0cb55c36fc0a14824e604b5f6b05 Mon Sep 17 00:00:00 2001 From: Benoit Daloze Date: Wed, 6 Jan 2021 20:41:33 +0100 Subject: [PATCH] Minor fixes --- core/module/ruby2_keywords_spec.rb | 6 +++--- core/proc/ruby2_keywords_spec.rb | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/core/module/ruby2_keywords_spec.rb b/core/module/ruby2_keywords_spec.rb index 4b403e6780..34c45cb1bc 100644 --- a/core/module/ruby2_keywords_spec.rb +++ b/core/module/ruby2_keywords_spec.rb @@ -2,7 +2,7 @@ require_relative 'fixtures/classes' ruby_version_is "2.7" do - describe "Module.ruby2_keywords" do + describe "Module#ruby2_keywords" do it "marks the final hash argument as keyword hash" do obj = Object.new @@ -16,7 +16,7 @@ def foo(*a) a.last end end ruby_version_is "2.7" ... "3.0" do - it "suppresses deprecation warning" do + it "fixes delegation warnings when calling a method accepting keywords" do obj = Object.new obj.singleton_class.class_exec do @@ -54,7 +54,7 @@ def foo(*a) end }.should raise_error(NameError, /undefined method `not_existing'/) end - it "excepts String as well" do + it "acceps String as well" do obj = Object.new obj.singleton_class.class_exec do diff --git a/core/proc/ruby2_keywords_spec.rb b/core/proc/ruby2_keywords_spec.rb index 53c64627bd..4f6bc151b6 100644 --- a/core/proc/ruby2_keywords_spec.rb +++ b/core/proc/ruby2_keywords_spec.rb @@ -11,7 +11,7 @@ end ruby_version_is "2.7" ... "3.0" do - it "suppresses deprecation warning when calls a method" do + it "fixes delegation warnings when calling a method accepting keywords" do obj = Object.new def obj.foo(*a, **b) end @@ -22,7 +22,7 @@ def obj.foo(*a, **b) end -> { f.call(1, 2, {a: "a"}) }.should_not complain end - it "suppresses deprecation warning when calls another proc" do + it "fixes delegation warnings when calling a proc accepting keywords" do g = -> *a, **b { } f = -> *a { g.call(*a) }