https://github.com/shopify/liquid-c/pull/115 fixed ArgumentError translation for Liquid::Variable#render, but Liquid::Context#evaluate was still doing a direct function call in C to the implementation of Liquid::C::Expression#evaluate. As a result, the error was still not being translated properly.
Solution
The first commit refactors the variable expression evaluation to provide an internal_variable_expression_evaluate function for context.c.
The second commit fixes the bug by checking the class in context_evaluate to call internal_variable_expression_evaluate for a cLiquidCVariableExpression.
Problem
https://github.com/shopify/liquid-c/pull/115 fixed ArgumentError translation for Liquid::Variable#render, but Liquid::Context#evaluate was still doing a direct function call in C to the implementation of Liquid::C::Expression#evaluate. As a result, the error was still not being translated properly.
Solution
The first commit refactors the variable expression evaluation to provide an internal_variable_expression_evaluate function for context.c.
The second commit fixes the bug by checking the class in context_evaluate to call internal_variable_expression_evaluate for a cLiquidCVariableExpression.