[ruby-core:85593] [Ruby trunk Bug#14323] net/ftp: fix FrozenError in BufferedSocket

From: naruse@...
Date: 2018-02-16 08:28:20 UTC
List: ruby-core #85593
Issue #14323 has been updated by naruse (Yui NARUSE).

Backport changed from 2.3: REQUIRED, 2.4: REQUIRED, 2.5: REQUIRED to 2.3: REQUIRED, 2.4: REQUIRED, 2.5: DONE

ruby_2_5 r62425 merged revision(s) 61639.

----------------------------------------
Bug #14323: net/ftp: fix FrozenError in BufferedSocket
https://bugs.ruby-lang.org/issues/14323#change-70390

* Author: normalperson (Eric Wong)
* Status: Closed
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: 
* Backport: 2.3: REQUIRED, 2.4: REQUIRED, 2.5: DONE
----------------------------------------
net/ftp: fix FrozenError in BufferedSocket

I noticed this bug while working on something else with
RUBYOPT=-d on, existing test cases all passed with it.

Note: I use String.new because it is the local style, here,
I prefer +'' (or ''.b, for a future commit)

* lib/net/ftp.rb (BufferedSocket#read): use String.new
* test/net/ftp/test_buffered_socket.rb (test_read_nil): new test


---Files--------------------------------
0001-net-ftp-fix-FrozenError-in-BufferedSocket.patch (1.6 KB)


-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:[email protected]?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>

In This Thread

Prev Next