1
0
Fork 0
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:
Kyrylo Silin 2019-03-01 01:14:08 +02:00
parent 507c93b67f
commit 017fc06722
2 changed files with 1 additions and 9 deletions

View file

@ -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:

View file

@ -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.