Skip to content

Commit 697c6e4

Browse files
committed
Pass nil as the default value for buffer for StringIO#sysread and #read_nonblock
1 parent 0414b9a commit 697c6e4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/truffle/stringio.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -522,7 +522,7 @@ def sync=(val)
522522
val
523523
end
524524

525-
def sysread(length = nil, buffer = '')
525+
def sysread(length = nil, buffer = nil)
526526
str = read(length, buffer)
527527

528528
if str.nil?
@@ -534,7 +534,7 @@ def sysread(length = nil, buffer = '')
534534

535535
alias_method :readpartial, :sysread
536536

537-
def read_nonblock(length, buffer = '', exception: true)
537+
def read_nonblock(length, buffer = nil, exception: true)
538538
str = read(length, buffer)
539539

540540
if exception and str.nil?

0 commit comments

Comments
 (0)