mirror of
https://github.com/pry/pry.git
synced 2022-11-09 12:35:05 -05:00
rubocop: fix offences of the Lint/UnderscorePrefixedVariableName cop
This commit is contained in:
parent
b895f14a5a
commit
0cbaf6d10d
4 changed files with 9 additions and 13 deletions
|
@ -18,10 +18,6 @@ Lint/ShadowedException:
|
|||
Exclude:
|
||||
- 'lib/pry/method.rb'
|
||||
|
||||
# Offense count: 32
|
||||
Lint/UnderscorePrefixedVariableName:
|
||||
Enabled: false
|
||||
|
||||
# Offense count: 1
|
||||
# Configuration parameters: CheckForMethodsWithNoSideEffects.
|
||||
Lint/Void:
|
||||
|
|
|
@ -143,10 +143,10 @@ class Pry
|
|||
def check_for_juxtaposed_replay(replay_sequence)
|
||||
if replay_sequence =~ /\Ahist(?:ory)?\b/
|
||||
# Create *fresh* instance of Options for parsing of "hist" command.
|
||||
_slop = slop
|
||||
_slop.parse replay_sequence.split(' ')[1..-1]
|
||||
slop_instance = slop
|
||||
slop_instance.parse(replay_sequence.split(' ')[1..-1])
|
||||
|
||||
if _slop.present?(:r)
|
||||
if slop_instance.present?(:r)
|
||||
replay_sequence = replay_sequence.split("\n").join('; ')
|
||||
index = opts[:r]
|
||||
index = index.min if index.min == index.max || index.max.nil?
|
||||
|
|
|
@ -34,8 +34,8 @@ class Pry
|
|||
# @param [Pry] pry_instance the Pry instance to make non-interactive.
|
||||
def non_interactive_mode(pry_instance, content)
|
||||
pry_instance.print = proc {}
|
||||
pry_instance.exception_handler = proc do |o, _e, _p_|
|
||||
_p_.run_command "cat --ex"
|
||||
pry_instance.exception_handler = proc do |o, _e, p|
|
||||
p.run_command "cat --ex"
|
||||
o.puts "...exception encountered, going interactive!"
|
||||
interactive_mode(pry_instance)
|
||||
end
|
||||
|
|
|
@ -437,10 +437,10 @@ describe Pry do
|
|||
|
||||
describe "Pry.binding_for" do
|
||||
it 'should return TOPLEVEL_BINDING if parameter self is main' do
|
||||
_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)
|
||||
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)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue