ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
From: shugo@ruby-lang.org
To: ruby-core@ruby-lang.org
Subject: [ruby-core:71668] [Ruby trunk - Bug #11738] [Open] ARGF.readpartial raises a wrong exception
Date: Wed, 25 Nov 2015 01:07:19 +0000	[thread overview]
Message-ID: <redmine.issue-11738.20151125010718.21349d53bf4fc3db@ruby-lang.org> (raw)
In-Reply-To: redmine.issue-11738.20151125010718@ruby-lang.org

Issue #11738 has been reported by Shugo Maeda.

----------------------------------------
Bug #11738: ARGF.readpartial raises a wrong exception
https://bugs.ruby-lang.org/issues/11738

* Author: Shugo Maeda
* Status: Open
* Priority: Normal
* Assignee: 
* ruby -v: ruby 2.3.0dev (2015-11-09 trunk 52500) [x86_64-linux]
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN
----------------------------------------
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/

       reply	other threads:[~2015-11-25  0:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <redmine.issue-11738.20151125010718@ruby-lang.org>
2015-11-25  1:07 ` shugo [this message]
2015-11-25  1:15   ` [ruby-core:71669] Re: [Ruby trunk - Bug #11738] [Open] ARGF.readpartial raises a wrong exception Eric Wong
2015-11-25  2:00 ` [ruby-core:71671] [Ruby trunk - Bug #11738] " shugo
2015-11-29  9:10 ` [ruby-core:71734] " nagachika00
2015-11-30 12:20 ` [ruby-core:71752] " usa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.ruby-lang.org/en/community/mailing-lists/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=redmine.issue-11738.20151125010718.21349d53bf4fc3db@ruby-lang.org \
    --to=ruby-core@ruby-lang.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).