mirror of
https://github.com/pry/pry.git
synced 2022-11-09 12:35:05 -05:00
rubocop: fix offences of the Layout/AlignArray cop
This commit is contained in:
parent
6b4c498767
commit
7b5401b54d
3 changed files with 7 additions and 11 deletions
|
@ -13,13 +13,6 @@ Gemspec/RequiredRubyVersion:
|
|||
Exclude:
|
||||
- 'pry.gemspec'
|
||||
|
||||
# Offense count: 2
|
||||
# Cop supports --auto-correct.
|
||||
Layout/AlignArray:
|
||||
Exclude:
|
||||
- 'lib/pry/commands/ls/ls_entity.rb'
|
||||
- 'spec/pry_spec.rb'
|
||||
|
||||
# Offense count: 34
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle.
|
||||
|
|
|
@ -61,8 +61,10 @@ class Pry
|
|||
end
|
||||
|
||||
def entities
|
||||
[globals, constants, methods, self_methods, instance_vars, local_names,
|
||||
local_vars]
|
||||
[
|
||||
globals, constants, methods, self_methods, instance_vars, local_names,
|
||||
local_vars
|
||||
]
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -367,8 +367,9 @@ describe Pry do
|
|||
# JRuby behaves different than CRuby here (seems it always has to some extent, see 'unless' below).
|
||||
# It didn't seem trivial to work around. Skip for now.
|
||||
skip "JRuby incompatibility" if Pry::Helpers::Platform.jruby?
|
||||
[:test, 0, true, false, nil,
|
||||
(0.0 unless Pry::Helpers::Platform.jruby?)].each do |val|
|
||||
[
|
||||
:test, 0, true, false, nil, (0.0 unless Pry::Helpers::Platform.jruby?)
|
||||
].each do |val|
|
||||
pry_eval(val, "def hello; end");
|
||||
expect(val.class.instance_methods(false).map(&:to_sym).include?(:hello)).to eq true
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue