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:
parent
8636db1384
commit
8ee26ebd7b
3 changed files with 2 additions and 11 deletions
|
@ -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:
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue