Commit Graph
23 Commits
Author SHA1 Message Date
0d26f05bb8 Enabled frozen string literals (#1154)
* Enabled frozen string literals

* Update rubocop config

* Prefer string interpolation in simple cases

Co-Authored-By: Dylan Thacker-Smith <[email protected]>
2019-09-18 13:19:45 +10:00
Mike Angell 799da202df Apply simple rubocop fixes 2019-08-31 21:58:33 +10:00
Stephen Paul Weber 7d13d88258 s/Traversal/ParseTreeVisitor 2018-10-18 09:38:33 -04:00
Stephen Paul Weber c11fc656cf Colocate Traversal classes with classes they traverse
This puts all knowledge of the traversal in the same file, and removes
the need for a CASES registry.
2018-10-18 09:37:48 -04:00
Stephen Paul Weber d789ec4175 Liquid::Traversal
This enables traversal over whole document tree.
2018-10-15 10:11:58 -04:00
Dylan Thacker-SmithandGitHub 8928454e29 Use a loop to evaluate binary comparisions to avoid recursion (#891)
Using recursion allows a malicious template to cause a SystemStackError
2017-05-10 10:41:24 -04:00
Dylan Thacker-SmithandGitHub 2bb3552033 Fix internal liquid error when comparing hash with incompatible type (#849) 2017-01-16 13:13:17 -05:00
Florian Weingarten 4c22cef341 blank and empty as variable names 2015-06-04 12:30:50 -04:00
Dylan Thacker-Smith 8a2947865b Avoid an exception from checking if a string contains a non-string. 2015-06-03 02:21:51 -04:00
Florian Weingarten 3372ca8136 Rubocop 2015-05-14 14:37:18 +00:00
Dylan Thacker-Smith a1a128db19 Refactor Condition so that it takes a parsed expression. 2014-10-18 15:03:40 -04:00
Dylan Thacker-Smith 37260f17ff Use Expression.parse and Context#evaluate in the Condition class. 2014-10-18 14:27:58 -04:00
Florian Weingarten 7196a2d58e Avoid parallel assignments 2014-10-18 13:58:32 +00:00
Bogdan Gusiev 4e9d414fde Fixed condition constains operator with wrong data type
"contains" operator on wrong data type should not cause NoMethodError.
2014-08-18 17:32:29 +03:00
Bogdan Gusiev fa14fd02e7 Raise Liquid::ArugmentError when condition has wrong usage
Condition now raises ::ArgumentError when built wrongly.
This patch make it raise Liquid::ArgumentError instead
to indicate a liquid markup error instead of ruby error.
2014-04-21 16:42:37 +03:00
Florian Weingarten 0a7de51e2b Revert some freezes on non-literals 2014-01-27 14:56:07 -05:00
Florian Weingarten 43ac8d560b Freeze all the things 2014-01-07 12:35:16 -05:00
James MacAulay 11dc18bfdf A better fix for "and"/"or" in strings
(now with less side effects)
2009-09-23 15:44:29 -04:00
James MacAulay f42ce88456 fixed conditions with strings containing "and"/"or" 2009-09-14 15:01:26 -04:00
James MacAulay d1d6febfc1 'contains' operator returns false if either operand is nil 2009-08-19 19:38:31 -04:00
Jakub KuźmaandTobias Lütke 8d27864845 Ruby 1.9.1 bugfixes
Signed-off-by: Tobias Lütke <[email protected]>
2009-04-17 06:33:25 +08:00
Tobias Lütke 7f58cbf82d Merged last set of changes from original SVN location 2008-05-08 11:34:43 -04:00
Tobias Lütke 1d647361e1 Initial github import of liquid 2008-05-08 11:28:13 -04:00