mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-12 23:40:45 -07:00
style: fix rubocop offenses
Co-Authored-By: Claude Opus 4.5 <[email protected]>
This commit is contained in:
co-authored by
Claude Opus 4.5
parent
1b420ab6d8
commit
6f03452245
@@ -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)
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user