Skip to content

Commit 72e0d06

Browse files
author
Ivan Nastyukhin
committed
Do not play with mutable data
1 parent ccbc8d6 commit 72e0d06

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/beefcake/buffer/base.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@ def length
8787
end
8888

8989
def <<(bytes)
90-
bytes = bytes.force_encoding('BINARY') if bytes.respond_to? :force_encoding
91-
buf << bytes
90+
new_bytes = bytes.force_encoding('BINARY') if bytes.respond_to? :force_encoding
91+
buf << new_bytes
9292
end
9393

9494
def read(n)

0 commit comments

Comments
 (0)