summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog18
-rw-r--r--ext/stringio/stringio.c11
2 files changed, 14 insertions, 15 deletions
diff --git a/ChangeLog b/ChangeLog
index cbc7777d64..575b64b11b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Thu Aug 11 23:29:03 2005 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * ext/stringio/stringio.c: keep holding string after closed.
+
Thu Aug 11 13:01:48 2005 Kouhei Sutou <kou@cozmixng.org>
* lib/rss: fixed sort bug. [ruby-list:41018]
@@ -24,9 +28,9 @@ Thu Aug 11 13:01:48 2005 Kouhei Sutou <kou@cozmixng.org>
Wed Aug 10 10:29:40 2005 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
- * ext/tk/lib/tk.rb: fix bug on handling __ruby2val_optkeys().
+ * ext/tk/lib/tk.rb: fix bug on handling __ruby2val_optkeys().
- * ext/tk/lib/tk/itemconfig.rb: fix bug on handling
+ * ext/tk/lib/tk/itemconfig.rb: fix bug on handling
__item_ruby2val_optkeys().
* ext/tk/lib/tk/canvas.rb: didn't check __item_ruby2val_optkeys().
@@ -40,11 +44,11 @@ Tue Aug 9 15:12:04 2005 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
* ext/tk/lib/tk.rb: add __val2ruby_optkeys and __ruby2val_optkeys to
help to convert option values between ruby and tcl.
- * ext/tk/lib/tk/itemconfig.rb: add __item_val2ruby_optkeys and
- __item_ruby2val_optkeys to help to convert option values between
+ * ext/tk/lib/tk/itemconfig.rb: add __item_val2ruby_optkeys and
+ __item_ruby2val_optkeys to help to convert option values between
ruby and tcl.
- * ext/tk/lib/tk/radiobutton.rb: use __ruby2val_optkeys for 'variable'
+ * ext/tk/lib/tk/radiobutton.rb: use __ruby2val_optkeys for 'variable'
option (for the reason of backward compatibility).
* ext/tk/lib/tk/composite.rb: clarify the arguments of super().
@@ -73,12 +77,12 @@ Sun Aug 7 23:50:14 2005 NAKAMURA, Hiroshi <nakahiro@sarion.co.jp>
Sun Aug 7 01:31:15 2005 Masaki Suketa <masaki.suketa@nifty.ne.jp>
- * ext/win32ole/win32ole.c (WIN32OLE_EVENT#on_event): should set
+ * ext/win32ole/win32ole.c (WIN32OLE_EVENT#on_event): should set
only one event handler.
* ext/win32ole/tests/testOLEEVENT.rb: ditto.
- * ext/win32ole/tests/testOLEPARAM.rb: remove re-defined
+ * ext/win32ole/tests/testOLEPARAM.rb: remove re-defined
test_ole_type_detail method.
Sat Aug 6 12:35:24 2005 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
diff --git a/ext/stringio/stringio.c b/ext/stringio/stringio.c
index 776e5231b7..e261674551 100644
--- a/ext/stringio/stringio.c
+++ b/ext/stringio/stringio.c
@@ -384,10 +384,9 @@ strio_close(self)
VALUE self;
{
struct StringIO *ptr = StringIO(self);
- if (CLOSED(ptr)) {
+ if (CLOSED(ptr) || !(ptr->flags & FMODE_READWRITE)) {
rb_raise(rb_eIOError, "closed stream");
}
- ptr->string = Qnil;
ptr->flags &= ~FMODE_READWRITE;
return Qnil;
}
@@ -407,9 +406,7 @@ strio_close_read(self)
if (!READABLE(ptr)) {
rb_raise(rb_eIOError, "closing non-duplex IO for reading");
}
- if (!((ptr->flags &= ~FMODE_READABLE) & FMODE_READWRITE)) {
- ptr->string = Qnil;
- }
+ ptr->flags &= ~FMODE_READABLE;
return Qnil;
}
@@ -428,9 +425,7 @@ strio_close_write(self)
if (!WRITABLE(ptr)) {
rb_raise(rb_eIOError, "closing non-duplex IO for writing");
}
- if (!((ptr->flags &= ~FMODE_WRITABLE) & FMODE_READWRITE)) {
- ptr->string = Qnil;
- }
+ ptr->flags &= ~FMODE_WRITABLE;
return Qnil;
}