mirror of
https://github.com/pry/pry.git
synced 2022-11-09 12:35:05 -05:00
rubocop: fix offences of the Lint/ReturnInVoidContext cop
This commit is contained in:
parent
850ac861d0
commit
11f798d300
2 changed files with 5 additions and 6 deletions
|
@ -13,11 +13,6 @@ Gemspec/RequiredRubyVersion:
|
|||
Exclude:
|
||||
- 'pry.gemspec'
|
||||
|
||||
# Offense count: 1
|
||||
Lint/ReturnInVoidContext:
|
||||
Exclude:
|
||||
- 'lib/pry/command_set.rb'
|
||||
|
||||
# Offense count: 1
|
||||
Lint/ShadowedException:
|
||||
Exclude:
|
||||
|
|
|
@ -325,7 +325,11 @@ class Pry
|
|||
# Pry.config.commands["help"] = MyHelpCommand
|
||||
#
|
||||
def []=(pattern, command)
|
||||
return @commands.delete(pattern) if command.equal?(nil)
|
||||
if command.equal?(nil)
|
||||
@commands.delete(pattern)
|
||||
return
|
||||
end
|
||||
|
||||
unless Class === command && command < Pry::Command
|
||||
raise TypeError, "command is not a subclass of Pry::Command"
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue