Skip to content

Commit 37d5f65

Browse files
keelerm84claude
andcommitted
fix: Ensure buffer reset preserves mutability and binary encoding
Replace `buffer = ""` with `buffer = +"".b` so the reset buffer remains unfrozen and binary-encoded, matching the initial assignment. Without this, `buffer << chunk` after the reset would raise a FrozenError in Ruby 3.4+ where string literals are frozen by default. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 2d61236 commit 37d5f65

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/ld-eventsource/impl/buffered_line_reader.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def self.lines_from(chunks)
6666
end
6767
end
6868
if i == buffer.length
69-
buffer = ""
69+
buffer = +"".b
7070
i = 0
7171
end
7272
position = i

0 commit comments

Comments
 (0)