https://bugs.ruby-lang.org/https://bugs.ruby-lang.org/favicon.ico?17097754782012-11-06T00:25:08ZRuby Issue Tracking SystemRuby master - Bug #7231: StringIO inconsistently raises IOError or RuntimeError if the string is frozenhttps://bugs.ruby-lang.org/issues/7231?journal_id=324392012-11-06T00:25:08Zmame (Yusuke Endoh)mame@ruby-lang.org
<ul></ul><p>Indeed. I think that it should raise IOError constantly. Any opinion?<br>
Anyone could create a patch, please?</p>
<p>--<br>
Yusuke Endoh <a href="mailto:mame@tsg.ne.jp" class="email">mame@tsg.ne.jp</a></p> Ruby master - Bug #7231: StringIO inconsistently raises IOError or RuntimeError if the string is frozenhttps://bugs.ruby-lang.org/issues/7231?journal_id=349702012-12-21T22:54:23Zusa (Usaku NAKAMURA)usa@garbagecollect.jp
<ul><li><strong>Category</strong> set to <i>ext</i></li><li><strong>Status</strong> changed from <i>Open</i> to <i>Assigned</i></li><li><strong>Assignee</strong> set to <i>nobu (Nobuyoshi Nakada)</i></li><li><strong>Target version</strong> set to <i>2.0.0</i></li></ul> Ruby master - Bug #7231: StringIO inconsistently raises IOError or RuntimeError if the string is frozenhttps://bugs.ruby-lang.org/issues/7231?journal_id=350532012-12-25T12:01:14ZGlass_saga (Masaki Matsushita)glass.saga@gmail.com
<ul><li><strong>File</strong> <a href="/attachments/3375">patch.diff</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/3375/patch.diff">patch.diff</a> added</li></ul><p>How about the patch?</p> Ruby master - Bug #7231: StringIO inconsistently raises IOError or RuntimeError if the string is frozenhttps://bugs.ruby-lang.org/issues/7231?journal_id=351062012-12-27T20:43:06ZAnonymous
<ul><li><strong>Status</strong> changed from <i>Assigned</i> to <i>Closed</i></li><li><strong>% Done</strong> changed from <i>0</i> to <i>100</i></li></ul><p>This issue was solved with changeset r38628.<br>
Brian, thank you for reporting this issue.<br>
Your contribution to Ruby is greatly appreciated.<br>
May Ruby be with you.</p>
<hr>
<ul>
<li>
<p>ext/stringio/stringio.c (strio_ungetc): raise IOError instead of RuntimeError<br>
if the string is frozen.<br>
[Bug <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Bug: StringIO inconsistently raises IOError or RuntimeError if the string is frozen (Closed)" href="https://bugs.ruby-lang.org/issues/7231">#7231</a>] <a href="/issues/7231">[ruby-core:48530]</a></p>
</li>
<li>
<p>ext/stringio/stringio.c (strio_ungetbyte): ditto.</p>
</li>
<li>
<p>test/stringio/test_stringio.rb: a test for above.</p>
</li>
</ul>