Commit Graph
36 Commits
Author SHA1 Message Date
Jemma Issroff 128b4e35be Initialize context to nil on the Drop class
We believe this will reduce megamorphic exits in YJIT. There are
currently 241 separate shapes generated with edge_name "@context" in
SFR. Initializing it to nil will significantly reduce this number.
2023-01-12 15:35:22 -05:00
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
Thierry JoyalandGitHub 1dcad34b06 Merge pull request #1151 from Shopify/invokable-methods-for-enumerable-reject-include
Invokable methods for enumerable reject include?
2019-09-16 09:49:40 -04:00
Thierry Joyal c0ffee5919 Invokable methods for enumerable reject include? 2019-09-12 12:58:51 +00:00
Mike Angell 799da202df Apply simple rubocop fixes 2019-08-31 21:58:33 +10:00
Florian Weingarten d2f16d92d6 Fix a bunch of Ruby warnings 2016-03-30 20:42:30 +00:00
Gaurav Chande dde00253f9 context is not always present on a Drop 2016-03-01 21:22:11 +00:00
Ivan Kuznetsov dadd9b4dd2 Add strict_variables/strict_filters render options to check for undefined variables and filters 2016-02-03 10:49:33 +07:00
Dylan Thacker-Smith bdb9a4a47f Remove nil and empty string check in invoke_drop. 2015-11-09 15:03:36 -05:00
Thierry Joyal ac041c4ad1 Rename before_method as liquid_method_missing 2015-10-28 17:28:19 +00:00
Florian Weingarten 5919626da4 Rename 'has_key?' and 'has_interrupt?' 2015-06-04 13:14:46 -04:00
Florian Weingarten 82269e2509 fix a few more rubocop offenses 2015-06-04 13:09:58 -04:00
Florian Weingarten 3372ca8136 Rubocop 2015-05-14 14:37:18 +00:00
Thierry Joyal 8736b602ea Explode invokable_methods method on Liquid::Drop 2015-04-02 13:16:07 +00:00
Adam Doeler 5f8a028a56 Liquid::Drop should not return a string representation of standard ruby objects 2014-02-07 14:48:02 -05:00
Florian Weingarten a599a26f1a Remove some legacy Ruby 1.8 compatibility code 2013-10-31 15:35:12 -04:00
Florian Weingarten a57d576708 Overwrite drop inspect 2013-08-19 12:08:27 -04:00
Florian Weingarten f98949117d Fix .include? method on Enumerable drops, used by "contains" conditions 2013-08-02 10:23:10 -04:00
Florian Weingarten 7fdb789eac Ruby 1.8.x compatibility 2013-08-01 13:56:01 -04:00
Florian Weingarten ff570c3ddc Fix clashing method names in enumerable drops 2013-08-01 13:17:02 -04:00
Florian Weingarten 182d3fefb6 Always call 'to_liquid' on staff in map filter and allow to_liquid to be called on drops 2013-07-25 17:10:19 -04:00
Dylan Smith 38b4543bf1 Use sets to check if methods are invokable without symbolizing. 2013-02-05 14:45:08 -05:00
Jason Roelofs a48e162237 Change Drop method lookup to not hit respond_to?
Class.public_method_defined? ends up diving into Ruby's core looking for
a method with the given method_or_key. This process at some point turns
method_or_key into a Symbol. This change no longer takes that path and
thus doesn't grow the Symbol table.
2013-01-16 11:07:48 -05:00
Jason Roelofs 7bcb565668 Remove #to_sym calls from Drop and Variable
Symbols are not needed here and using plain strings is nicer on Ruby
2013-01-16 09:46:17 -05:00
Tom Burns 6c2fde5eea Instantiate blank string once instead of at every comparison 2012-10-25 11:54:19 -04:00
Daniel Schierbeck b51b30fac1 Fix typo and add punctuation 2012-05-03 14:16:06 +03:00
Igor Zubkov 0eafe7f2fd Fix typo 2011-12-16 12:28:29 +02:00
Jonathan Rudenberg b816521563 Merge pull request #72 from zacstewart/patch-1
Correct formatting for doc comments
2011-10-15 17:25:48 -07:00
Jonathan Rudenberg 487b240404 Fix another drop call regression 2011-10-14 11:21:22 -04:00
Jonathan Rudenberg 8b5cf73ccc Fix regression with calling a drop with a empty string 2011-10-13 11:47:23 -04:00
Zac 6cf6d8b990 Correct formatting for doc comments
Portions of the code examples were not being rendered as code because they lacked a leading tab. Also, a missing period on the first sentence made the first paragraph confusing.
2011-09-10 10:36:22 -03:00
Mark H. Wilkinson 935d3530af Handle invoking drops for keys that are not strings.
For example, {{ pages[8] ... }} will result in the integer value 8 being
passed to invoke_drop.
2011-04-12 14:11:06 +01:00
thedarkoneandTobias Lütke f7ff9c81d3 Make use of the Module#public_method_defined?. 2011-01-28 21:16:22 -05: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 ed75a6d948 Make before_method work more like method_missing 2008-05-08 17:22:07 -04:00
Tobias Lütke 1d647361e1 Initial github import of liquid 2008-05-08 11:28:13 -04:00