mirror of
https://github.com/pry/pry.git
synced 2022-11-09 12:35:05 -05:00
rubocop: fix offences of the Lint/StringConversionInInterpolation
This commit is contained in:
parent
3f24be5458
commit
dcb8c46150
4 changed files with 3 additions and 11 deletions
|
@ -636,14 +636,6 @@ Lint/ShadowedException:
|
|||
Exclude:
|
||||
- 'lib/pry/method.rb'
|
||||
|
||||
# Offense count: 4
|
||||
# Cop supports --auto-correct.
|
||||
Lint/StringConversionInInterpolation:
|
||||
Exclude:
|
||||
- 'lib/pry/command.rb'
|
||||
- 'lib/pry/commands/watch_expression.rb'
|
||||
- 'lib/pry/method/patcher.rb'
|
||||
|
||||
# Offense count: 36
|
||||
Lint/UnderscorePrefixedVariableName:
|
||||
Enabled: false
|
||||
|
|
|
@ -212,7 +212,7 @@ class Pry
|
|||
$1.capitalize.gsub(/_/, " ")
|
||||
when %r{(pry-\w+)-([\d\.]+([\w\.]+)?)}
|
||||
name, version = $1, $2
|
||||
"#{name.to_s} (v#{version.to_s})"
|
||||
"#{name} (v#{version})"
|
||||
when /pryrc/
|
||||
"pryrc"
|
||||
else
|
||||
|
|
|
@ -81,7 +81,7 @@ class Pry
|
|||
expressions.each do |expr|
|
||||
expr.eval!
|
||||
if expr.changed?
|
||||
output.puts "#{blue "watch"}: #{expr.to_s}"
|
||||
output.puts "#{blue "watch"}: #{expr}"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -94,7 +94,7 @@ class Pry
|
|||
def wrap_for_owner(source)
|
||||
Pry.current[:pry_owner] = method.owner
|
||||
owner_source = definition_for_owner(source)
|
||||
visibility_fix = "#{method.visibility.to_s} #{method.name.to_sym.inspect}"
|
||||
visibility_fix = "#{method.visibility} #{method.name.to_sym.inspect}"
|
||||
"Pry.current[:pry_owner].class_eval do; #{owner_source}\n#{visibility_fix}\nend"
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue