mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-15 08:50:45 -07:00
This reverts commit c743936a78.
This commit is contained in:
+1
-5
@@ -16,11 +16,7 @@ module Liquid
|
||||
|
||||
# Maintains Ruby 1.8.7 String#each behaviour on 1.9
|
||||
if collection.is_a?(String)
|
||||
return [] if collection.empty?
|
||||
if from > 0 || to == 0
|
||||
Usage.increment("string_slice_bug")
|
||||
end
|
||||
return [collection]
|
||||
return collection.empty? ? [] : [collection]
|
||||
end
|
||||
return [] unless collection.respond_to?(:each)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user