liquid 2.5.3 → 2.5.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MjdlODliYmQ5MTliNTllM2NjZDIxNzE0ZGE3MjBkMGQxYjEwMWFlZQ==
4
+ M2NmZTM4YmY3NmI3ZmMxZDkxOGU4ZDFjNWNjYTg5ZWE3MzVhMDUzNw==
5
5
  data.tar.gz: !binary |-
6
- ZmYxZmFjNTlkNGQ2ODM1YTlkZjlmZGU3ODE2MDhiOThlZTQ1MmI0Ng==
6
+ MDY1NTZhOTA3OTA2MDI1ODNkZGIwYzQxZWQ1M2M3ZmE1NmIzNmM5YQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- ZDQ5NjhlNmMyYTBjNDkwZjA5ZjkwMzE0Y2VkYWVlNDFhZmY4ZTExYTM3NDkw
10
- OTI3ZmZkNzBiNjY0OTVlNWIxMjU5OWI0NGZjNjFhMjJlMzgxMGQ2NGE4ZWE0
11
- YTllYTQwNzY5YTVlYzMyZDQ3YjM3MmIwNjExOTNlYTkyNTNhZDQ=
9
+ MGFjMWY1MjgwMDdiZThkODZjYzEwNWE0NmQ0ZmU1N2YyMWYyYWUxZWI1YTNj
10
+ ZmQzNTAwMzMwYTgyODIyMjc2ZWRkMTg2ZmE5MjJjM2NkNDRkNGExNzU1ZjZk
11
+ NDQ4NDJjMTU0MWE5OTUwNWMwYzZjYmQyNDMzNmNkZjFmMDgzZjM=
12
12
  data.tar.gz: !binary |-
13
- OWJjYzJhYWMzMzUzNTRkYTQxZGFiNWJjNmZiMWQ4M2YwNjk2YjU5YTY4ZTU4
14
- MGRjODMwOWM4MmJhNzM0MDdlOTA4N2FiNjE5NjVjYzRjODg0MzFjN2VlYTRl
15
- MDA4M2MyNWZmMzljN2E0NjlmZDJmZmI0NmFjZmM1YzQyYjJiZjE=
13
+ MzYzOWExZmQ5ODI2M2IwYmI4NzIwMDc0ZWU3ZjNmN2E4NThlYjczOTNkMGJi
14
+ YzRiODRiNWI4ZDFkZGZlYzUwYzNhMzE4MmZmY2M3ODQ0N2M2OTQ0NDA0MGYw
15
+ MjVjZmEzYzAzMTc2N2JiNTAyOWIxMjViYWEyNjhjMzI4ZDFjMjY=
data/History.md CHANGED
@@ -1,6 +1,10 @@
1
1
  # Liquid Version History
2
2
 
3
- ## 2.5.3 / branch "2.5-stable"
3
+ ## 2.5.4 / 2013-11-11 / branch "2.5-stable"
4
+
5
+ * Fix "can't convert Fixnum into String" for "replace", see #173, [wǒ_is神仙, jsw0528]
6
+
7
+ ## 2.5.3 / 2013-10-09
4
8
 
5
9
  * #232, #234, #237: Fix map filter bugs [Florian Weingarten, fw42]
6
10
 
@@ -107,12 +107,12 @@ module Liquid
107
107
 
108
108
  # Replace occurrences of a string with another
109
109
  def replace(input, string, replacement = '')
110
- input.to_s.gsub(string, replacement)
110
+ input.to_s.gsub(string, replacement.to_s)
111
111
  end
112
112
 
113
113
  # Replace the first occurrences of a string with another
114
114
  def replace_first(input, string, replacement = '')
115
- input.to_s.sub(string, replacement)
115
+ input.to_s.sub(string, replacement.to_s)
116
116
  end
117
117
 
118
118
  # remove a substring
@@ -157,9 +157,9 @@ class StandardFiltersTest < Test::Unit::TestCase
157
157
  end
158
158
 
159
159
  def test_replace
160
- assert_equal 'b b b b', @filters.replace("a a a a", 'a', 'b')
161
- assert_equal 'b a a a', @filters.replace_first("a a a a", 'a', 'b')
162
- assert_template_result 'b a a a', "{{ 'a a a a' | replace_first: 'a', 'b' }}"
160
+ assert_equal '2 2 2 2', @filters.replace('1 1 1 1', '1', 2)
161
+ assert_equal '2 1 1 1', @filters.replace_first('1 1 1 1', '1', 2)
162
+ assert_template_result '2 1 1 1', "{{ '1 1 1 1' | replace_first: '1', 2 }}"
163
163
  end
164
164
 
165
165
  def test_remove
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: liquid
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.5.3
4
+ version: 2.5.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tobias Luetke
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-10-09 00:00:00.000000000 Z
11
+ date: 2013-11-11 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email: