From ceaf00bdcd51120ccb66d658e62df0a14c6bd63a Mon Sep 17 00:00:00 2001 From: Matthew Keeler Date: Mon, 14 Jul 2025 12:58:41 -0400 Subject: [PATCH] fix: Explicitly mark buffer variable as unfrozen In a future version of Ruby, literal strings will be frozen by default. To avoid this causing an issue (and raising deprecation warnings now), we are explicitly marking this literal string as unfrozen. --- lib/ld-eventsource/impl/buffered_line_reader.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/ld-eventsource/impl/buffered_line_reader.rb b/lib/ld-eventsource/impl/buffered_line_reader.rb index 787020c..6f6f0e8 100644 --- a/lib/ld-eventsource/impl/buffered_line_reader.rb +++ b/lib/ld-eventsource/impl/buffered_line_reader.rb @@ -1,4 +1,3 @@ - module SSE module Impl class BufferedLineReader @@ -16,7 +15,7 @@ class BufferedLineReader # @return [Enumerator] an enumerator that will yield one line at a time in UTF-8 # def self.lines_from(chunks) - buffer = "".b + buffer = +"".b position = 0 line_start = 0 last_char_was_cr = false