diff --git a/lib/openssl/buffering.rb b/lib/openssl/buffering.rb index ceb2efb73..1464a4292 100644 --- a/lib/openssl/buffering.rb +++ b/lib/openssl/buffering.rb @@ -37,8 +37,8 @@ def append_as_bytes(string) end end - alias_method :concat, :append_as_bytes - alias_method :<<, :append_as_bytes + undef_method :concat + undef_method :<< end ## @@ -73,7 +73,7 @@ def initialize(*) def fill_rbuff begin - @rbuffer << self.sysread(BLOCK_SIZE) + @rbuffer.append_as_bytes(self.sysread(BLOCK_SIZE)) rescue Errno::EAGAIN retry rescue EOFError @@ -450,10 +450,10 @@ def <<(s) def puts(*args) s = Buffer.new if args.empty? - s << "\n" + s.append_as_bytes("\n") end args.each{|arg| - s << arg.to_s + s.append_as_bytes(arg.to_s) s.sub!(/(?