https://github.com/Shopify/liquid/pull/1607 fixed an exception during parsing, turning it into a proper Liquid::SyntaxError. However, that expression parsing had been ported to liquid-c, which had the same issue.
Solution
Use rb_check_funcall to handle the case where a literal range bound value doesn't respond to to_i and raise the same syntax error.
I'll open a corresponding liquid PR to fix the testing of this error.
cc @charlespwd
Problem
https://github.com/Shopify/liquid/pull/1607 fixed an exception during parsing, turning it into a proper Liquid::SyntaxError. However, that expression parsing had been ported to liquid-c, which had the same issue.
Solution
Use
rb_check_funcall
to handle the case where a literal range bound value doesn't respond toto_i
and raise the same syntax error.I'll open a corresponding liquid PR to fix the testing of this error.