File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -37,8 +37,8 @@ def append_as_bytes(string)
3737 end
3838 end
3939
40- alias_method :concat , :append_as_bytes
41- alias_method :<< , :append_as_bytes
40+ undef_method :concat
41+ undef_method :<<
4242 end
4343
4444 ##
@@ -73,7 +73,7 @@ def initialize(*)
7373
7474 def fill_rbuff
7575 begin
76- @rbuffer << self . sysread ( BLOCK_SIZE )
76+ @rbuffer . append_as_bytes ( self . sysread ( BLOCK_SIZE ) )
7777 rescue Errno ::EAGAIN
7878 retry
7979 rescue EOFError
@@ -450,10 +450,10 @@ def <<(s)
450450 def puts ( *args )
451451 s = Buffer . new
452452 if args . empty?
453- s << "\n "
453+ s . append_as_bytes ( "\n " )
454454 end
455455 args . each { |arg |
456- s << arg . to_s
456+ s . append_as_bytes ( arg . to_s )
457457 s . sub! ( /(?<!\n )\z / , "\n " )
458458 }
459459 do_write ( s )
@@ -467,7 +467,7 @@ def puts(*args)
467467
468468 def print ( *args )
469469 s = Buffer . new
470- args . each { |arg | s << arg . to_s }
470+ args . each { |arg | s . append_as_bytes ( arg . to_s ) }
471471 do_write ( s )
472472 nil
473473 end
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ def sysread(size)
3131 end
3232
3333 def syswrite ( str )
34- @io << str
34+ @io . append_as_bytes ( str )
3535 str . size
3636 end
3737 end
You can’t perform that action at this time.
0 commit comments