Fix SharedMemoryIO#read for binary data on Ruby 1.9+
This commit is contained in:
1 parent
dddf0be4ef
commit
41b6777638
2 files changed
+37
No files matched your search
@@ -198,6 +198,7 @@ module ProcessShared
|
||||
def read(length = nil, buffer = nil)
|
||||
length ||= (mem.size - pos)
|
||||
buffer ||= ''
|
||||
buffer.force_encoding('ASCII-8BIT') unless RUBY_VERSION.start_with?('1.8')
|
||||
|
||||
actual_length = [(mem.size - pos), length].min
|
||||
actual_length.times do
|
||||
|
||||
Reference in new issue
Block a user