Skip to content

Commit 3661e67

Browse files
committed
rubocop -A --only Style/MutableConstant
1 parent c189cd5 commit 3661e67

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lib/simplecov/lines_classifier.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ class LinesClassifier
88
RELEVANT = 0
99
NOT_RELEVANT = nil
1010

11-
WHITESPACE_LINE = /^\s*$/
12-
COMMENT_LINE = /^\s*#/
11+
WHITESPACE_LINE = /^\s*$/.freeze
12+
COMMENT_LINE = /^\s*#/.freeze
1313
WHITESPACE_OR_COMMENT_LINE = Regexp.union(WHITESPACE_LINE, COMMENT_LINE)
1414

1515
def self.no_cov_line

lib/simplecov/source_file.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ def load_source
190190
end
191191
end
192192

193-
SHEBANG_REGEX = /\A#!/
193+
SHEBANG_REGEX = /\A#!/.freeze
194194
def shebang?(line)
195195
SHEBANG_REGEX.match?(line)
196196
end
@@ -202,7 +202,7 @@ def read_lines(file, lines, current_line)
202202
lines.concat([current_line], ensure_remove_undefs(file.readlines))
203203
end
204204

205-
RUBY_FILE_ENCODING_MAGIC_COMMENT_REGEX = /\A#\s*(?:-\*-)?\s*(?:en)?coding:\s*(\S+)\s*(?:-\*-)?\s*\z/
205+
RUBY_FILE_ENCODING_MAGIC_COMMENT_REGEX = /\A#\s*(?:-\*-)?\s*(?:en)?coding:\s*(\S+)\s*(?:-\*-)?\s*\z/.freeze
206206
def set_encoding_based_on_magic_comment(file, line)
207207
# Check for encoding magic comment
208208
# Encoding magic comment must be placed at first line except for shebang

0 commit comments

Comments
 (0)