mirror of
https://github.com/pry/pry.git
synced 2022-11-09 12:35:05 -05:00
rubocop: fix offences of the Style/ClassCheck cop
This commit is contained in:
parent
507c93b67f
commit
017fc06722
2 changed files with 1 additions and 9 deletions
|
@ -203,14 +203,6 @@ Style/AsciiComments:
|
|||
Style/CaseEquality:
|
||||
Enabled: false
|
||||
|
||||
# Offense count: 1
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: EnforcedStyle.
|
||||
# SupportedStyles: is_a?, kind_of?
|
||||
Style/ClassCheck:
|
||||
Exclude:
|
||||
- 'lib/pry/pry_class.rb'
|
||||
|
||||
# Offense count: 1
|
||||
Style/ClassVars:
|
||||
Exclude:
|
||||
|
|
|
@ -237,7 +237,7 @@ you can add "Pry.config.windows_console_warning = false" to your pryrc.
|
|||
def self.view_clip(obj, options = {})
|
||||
max = options.fetch :max_length, 60
|
||||
id = options.fetch :id, false
|
||||
if obj.kind_of?(Module) && obj.name.to_s != "" && obj.name.to_s.length <= max
|
||||
if obj.is_a?(Module) && obj.name.to_s != "" && obj.name.to_s.length <= max
|
||||
obj.name.to_s
|
||||
elsif Pry.main == obj
|
||||
# special-case to support jruby.
|
||||
|
|
Loading…
Reference in a new issue