Issue #11738 has been updated by Usaku NAKAMURA. Backport changed from 2.0.0: REQUIRED, 2.1: REQUIRED, 2.2: DONE to 2.0.0: REQUIRED, 2.1: DONE, 2.2: DONE ruby_2_1 r52800 merged revision(s) 52745. ---------------------------------------- Bug #11738: ARGF.readpartial raises a wrong exception https://bugs.ruby-lang.org/issues/11738#change-55163 * Author: Shugo Maeda * Status: Closed * Priority: Normal * Assignee: * ruby -v: ruby 2.3.0dev (2015-11-09 trunk 52500) [x86_64-linux] * Backport: 2.0.0: REQUIRED, 2.1: DONE, 2.2: DONE ---------------------------------------- ARGF.readpartial raises a RuntimeError when EOF is detected more than twice: ``` lexington:ruby$ cat t.rb p ARGF.readpartial(16) rescue nil p ARGF.readpartial(16) lexington:ruby$ ruby t.rb /dev/null t.rb:2:in `readpartial': can't modify frozen NilClass (RuntimeError) from t.rb:2:in `<main>' lexington:ruby$ ``` An EOFError is expected. -- https://bugs.ruby-lang.org/