Skip to content

Commit

Permalink
Minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
eregon committed Jan 6, 2021
1 parent 933d049 commit 534507f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions core/module/ruby2_keywords_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions core/proc/ruby2_keywords_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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) }

Expand Down

0 comments on commit 534507f

Please sign in to comment.