Skip to content

Commit c155ca1

Browse files
committed
[GR-14920]: StringIO#close should be idempotent.
PullRequest: truffleruby/768
2 parents b612a0b + c298af8 commit c155ca1

File tree

3 files changed

+1
-2
lines changed

3 files changed

+1
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Bug fixes:
99
* `rb_protect` now returns `Qnil` when an error occurs.
1010
* Fixed a race condition when using the interpolate-once (`/o`) modifier in
1111
regular expressions.
12+
* Calling `StringIO#close` multiple times no longer raises an exception (#1640).
1213

1314
New features:
1415

lib/truffle/stringio.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,6 @@ def write(str)
234234
alias_method :write_nonblock, :write
235235

236236
def close
237-
raise IOError, 'closed stream' if closed?
238237
@readable = @writable = nil
239238
end
240239

spec/tags/library/stringio/close_tags.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)