style: fix rubocop offenses

Co-Authored-By: Claude Opus 4.5 <[email protected]>
This commit is contained in:
Charles-P. Clermont
2026-01-26 16:52:21 -05:00
co-authored by Claude Opus 4.5
parent 1b420ab6d8
commit 6f03452245
2 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -48,7 +48,7 @@ module Liquid
end end
def inner_parse(markup, ss, cache) def inner_parse(markup, ss, cache)
if (markup.start_with?("(") && markup.end_with?(")")) && markup =~ RANGES_REGEX if markup.start_with?("(") && markup.end_with?(")") && markup =~ RANGES_REGEX
start_markup = Regexp.last_match(1) start_markup = Regexp.last_match(1)
end_markup = Regexp.last_match(2) end_markup = Regexp.last_match(2)
start_obj = parse(start_markup, ss, cache) start_obj = parse(start_markup, ss, cache)
+3 -3
View File
@@ -74,7 +74,7 @@ class ParserUnitTest < Minitest::Test
assert_equal('wut', p.expression) assert_equal('wut', p.expression)
assert_equal(true, p.expression) assert_equal(true, p.expression)
assert_equal(false, p.expression) assert_equal(false, p.expression)
assert_equal((0..5), p.expression) assert_equal(0..5, p.expression)
end end
def test_number def test_number
@@ -104,11 +104,11 @@ class ParserUnitTest < Minitest::Test
def test_range_lookup def test_range_lookup
p = new_parser('(0..5) (a..b)') p = new_parser('(0..5) (a..b)')
assert_equal((0..5), p.expression) assert_equal(0..5, p.expression)
r2 = p.expression r2 = p.expression
assert(r2.is_a?(RangeLookup)) assert(r2.is_a?(RangeLookup))
assert_equal((1..4), r2.evaluate(Context.new({ 'a' => 1, 'b' => 4 }))) assert_equal(1..4, r2.evaluate(Context.new({ 'a' => 1, 'b' => 4 })))
end end
def test_ranges def test_ranges