1
0
Fork 0
mirror of https://github.com/pry/pry.git synced 2022-11-09 12:35:05 -05:00

rubocop: fix offences of the Style/Lambda cop

This commit is contained in:
Kyrylo Silin 2019-03-02 11:10:11 +02:00
parent 8636db1384
commit 8ee26ebd7b
3 changed files with 2 additions and 11 deletions

View file

@ -274,15 +274,6 @@ Style/IfInsideElse:
- 'lib/pry/slop/commands.rb'
- 'lib/pry/slop/option.rb'
# Offense count: 2
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
# SupportedStyles: line_count_dependent, lambda, literal
Style/Lambda:
Exclude:
- 'lib/pry/commands/ls/methods.rb'
- 'spec/pry_spec.rb'
# Offense count: 5
# Cop supports --auto-correct.
Style/LineEndConcatenation:

View file

@ -48,7 +48,7 @@ class Pry
else
_pry_.config.ls.ceiling.dup
end
lambda { |klass| !ceiling.include?(klass) }
->(klass) { !ceiling.include?(klass) }
end
end
end

View file

@ -411,7 +411,7 @@ describe Pry do
describe "Pry.binding_for" do
it 'should return TOPLEVEL_BINDING if parameter self is main' do
_main_ = lambda { TOPLEVEL_BINDING.eval('self') }
_main_ = -> { TOPLEVEL_BINDING.eval('self') }
expect(Pry.binding_for(_main_.call).is_a?(Binding)).to eq true
expect(Pry.binding_for(_main_.call)).to eq TOPLEVEL_BINDING
expect(Pry.binding_for(_main_.call)).to eq Pry.binding_for(_main_.call)