handle join on fixnum

This commit is contained in:
Richard Monette
2017-02-01 12:47:35 -05:00
parent 384e4313ff
commit d17f86ba4d
2 changed files with 2 additions and 1 deletions

View File

@@ -384,7 +384,7 @@ module Liquid
end
def join(glue)
to_a.join(glue)
to_a.join(glue.to_s)
end
def concat(args)

View File

@@ -170,6 +170,7 @@ class StandardFiltersTest < Minitest::Test
def test_join
assert_equal '1 2 3 4', @filters.join([1, 2, 3, 4])
assert_equal '1 - 2 - 3 - 4', @filters.join([1, 2, 3, 4], ' - ')
assert_equal '1121314', @filters.join([1, 2, 3, 4], 1)
end
def test_sort