diff --git a/History.md b/History.md index 7d94db602..9414dd7af 100644 --- a/History.md +++ b/History.md @@ -1,5 +1,12 @@ # Liquid Change Log +## 5.6.0 (unreleased) + +### Fixes + +* Fix Tokenizer to handle null source value (#1873) [Bahar Pourazar] + + ## 5.5.0 2024-03-21 Please reference the GitHub release for more information. diff --git a/lib/liquid/tokenizer.rb b/lib/liquid/tokenizer.rb index cccdbf215..740f85999 100644 --- a/lib/liquid/tokenizer.rb +++ b/lib/liquid/tokenizer.rb @@ -5,7 +5,7 @@ class Tokenizer attr_reader :line_number, :for_liquid_tag def initialize(source, line_numbers = false, line_number: nil, for_liquid_tag: false) - @source = source.to_s + @source = source.to_s.to_str @line_number = line_number || (line_numbers ? 1 : nil) @for_liquid_tag = for_liquid_tag @offset = 0 diff --git a/lib/liquid/version.rb b/lib/liquid/version.rb index 4be6b9775..bc8ab3e56 100644 --- a/lib/liquid/version.rb +++ b/lib/liquid/version.rb @@ -2,5 +2,5 @@ # frozen_string_literal: true module Liquid - VERSION = "5.6.0.rc2" + VERSION = "5.6.0.rc3" end