lib/rubocop/cop/style/special_global_vars.rb in rubocop-1.5.2 vs lib/rubocop/cop/style/special_global_vars.rb in rubocop-1.6.0
- old
+ new
@@ -24,14 +24,10 @@
# puts $PROCESS_ID # or $PID
# puts $CHILD_STATUS
# puts $LAST_MATCH_INFO
# puts $IGNORECASE
# puts $ARGV # or ARGV
- # puts $MATCH
- # puts $PREMATCH
- # puts $POSTMATCH
- # puts $LAST_PAREN_MATCH
#
# @example EnforcedStyle: use_perl_names
# # good
# puts $:
# puts $"
@@ -49,14 +45,10 @@
# puts $$
# puts $?
# puts $~
# puts $=
# puts $*
- # puts $&
- # puts $`
- # puts $'
- # puts $+
#
class SpecialGlobalVars < Base
include ConfigurableEnforcedStyle
extend AutoCorrector
@@ -83,14 +75,10 @@
:$< => [:$DEFAULT_INPUT],
:$$ => %i[$PROCESS_ID $PID],
:$? => [:$CHILD_STATUS],
:$~ => [:$LAST_MATCH_INFO],
:$= => [:$IGNORECASE],
- :$* => %i[$ARGV ARGV],
- :$& => [:$MATCH],
- :$` => [:$PREMATCH],
- :$' => [:$POSTMATCH],
- :$+ => [:$LAST_PAREN_MATCH]
+ :$* => %i[$ARGV ARGV]
}
PERL_VARS =
Hash[ENGLISH_VARS.flat_map { |k, vs| vs.map { |v| [v, [k]] } }]