Skip to content

Commit 78a1306

Browse files
committed
Adjust nocov markings
Also, only set TEXT_END in a single place.
1 parent 16ca175 commit 78a1306

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

lib/erubi.rb

+3-4
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,18 @@ module Erubi
44
VERSION = '1.9.0'
55
RANGE_ALL = 0..-1
66

7+
# :nocov:
78
if RUBY_VERSION >= '1.9'
89
RANGE_FIRST = 0
910
RANGE_LAST = -1
10-
TEXT_END = RUBY_VERSION >= '2.1' ? "'.freeze;" : "';"
1111
else
12-
# :nocov:
1312
RANGE_FIRST = 0..0
1413
RANGE_LAST = -1..-1
15-
TEXT_END = "';"
16-
# :nocov:
1714
end
1815

16+
TEXT_END = RUBY_VERSION >= '2.1' ? "'.freeze;" : "';"
1917
MATCH_METHOD = RUBY_VERSION >= '2.4' ? :match? : :match
18+
# :nocov:
2019

2120
begin
2221
require 'cgi/escape'

0 commit comments

Comments
 (0)