Skip to content

Commit

Permalink
Fix Rubocop warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
andrykonchin committed Feb 4, 2025
1 parent 01321b9 commit 59e451a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion core/proc/parameters_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
end

it "regards keyword parameters in lambdas as required" do
lambda {|x:| }.parameters.first.first.should == :keyreq
-> x: { }.parameters.first.first.should == :keyreq
end

it "sets the first element of each sub-Array to :rest for parameters prefixed with asterisks" do
Expand Down
4 changes: 2 additions & 2 deletions language/block_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -737,8 +737,8 @@ def obj.to_ary; raise "Exception raised in #to_ary" end
end

it "accepts unnamed arguments" do
lambda { |_,_| }.should be_an_instance_of(Proc)
->(_,_) {}.should be_an_instance_of(Proc)
lambda { |_,_| }.should be_an_instance_of(Proc) # rubocop:disable Style/Lambda
-> _,_ {}.should be_an_instance_of(Proc)
Proc.new { |_,_| }.should be_an_instance_of(Proc)
end
end
Expand Down

0 comments on commit 59e451a

Please sign in to comment.