Skip to content

Commit cf8f9bf

Browse files
committed
Suppress a new Lint/MixedCaseRange offense
Follow up rubocop/rubocop#11561. ```console $ bundle exec rake (snip) Offenses: lib/rubocop/cop/rails/time_zone.rb:58:33: W: [Correctable] Lint/MixedCaseRange: Ranges from upper to lower case ASCII letters may include unintended characters. Instead of A-z (which also includes several symbols) specify each range individually: A-Za-z and individually specify any symbols. TIMEZONE_SPECIFIER = /([A-z]|[+-]\d{2}:?\d{2})\z/.freeze ^^^ 281 files inspected, 1 offense detected, 1 offense autocorrectable ```
1 parent 169427d commit cf8f9bf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/rubocop/cop/rails/time_zone.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ class TimeZone < Base
5555

5656
ACCEPTED_METHODS = %i[in_time_zone utc getlocal xmlschema iso8601 jisx0301 rfc3339 httpdate to_i to_f].freeze
5757

58-
TIMEZONE_SPECIFIER = /([A-z]|[+-]\d{2}:?\d{2})\z/.freeze
58+
TIMEZONE_SPECIFIER = /([A-Za-z]|[+-]\d{2}:?\d{2})\z/.freeze
5959

6060
def on_const(node)
6161
mod, klass = *node

0 commit comments

Comments
 (0)