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:
|
Style/CaseEquality:
|
||||||
Enabled: false
|
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
|
# Offense count: 1
|
||||||
Style/ClassVars:
|
Style/ClassVars:
|
||||||
Exclude:
|
Exclude:
|
||||||
|
|
|
@ -237,7 +237,7 @@ you can add "Pry.config.windows_console_warning = false" to your pryrc.
|
||||||
def self.view_clip(obj, options = {})
|
def self.view_clip(obj, options = {})
|
||||||
max = options.fetch :max_length, 60
|
max = options.fetch :max_length, 60
|
||||||
id = options.fetch :id, false
|
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
|
obj.name.to_s
|
||||||
elsif Pry.main == obj
|
elsif Pry.main == obj
|
||||||
# special-case to support jruby.
|
# special-case to support jruby.
|
||||||
|
|
Loading…
Reference in a new issue