Skip to content

Commit 549276c

Browse files
committed
Fix Rubocop warnings
1 parent 4d72f51 commit 549276c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

core/proc/parameters_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
end
6565

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

7070
it "sets the first element of each sub-Array to :rest for parameters prefixed with asterisks" do

language/block_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -737,8 +737,8 @@ def obj.to_ary; raise "Exception raised in #to_ary" end
737737
end
738738

739739
it "accepts unnamed arguments" do
740-
lambda { |_,_| }.should be_an_instance_of(Proc)
741-
->(_,_) {}.should be_an_instance_of(Proc)
740+
lambda { |_,_| }.should be_an_instance_of(Proc) # rubocop:disable Style/Lambda
741+
-> _,_ {}.should be_an_instance_of(Proc)
742742
Proc.new { |_,_| }.should be_an_instance_of(Proc)
743743
end
744744
end

0 commit comments

Comments
 (0)