From 7eb625425c3acb33ea712bc36bbe17302cfbca94 Mon Sep 17 00:00:00 2001 From: mame Date: Mon, 2 Jun 2008 12:45:42 +0000 Subject: * re.c: fix SEGV by Regexp.allocate.names, Match.allocate.names, etc. * test/ruby/test_regexp.rb: add tests for above. * io.c: fix SEGV by IO.allocate.print, etc. * test/ruby/test_io.rb: add tests for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16757 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- io.c | 1 + 1 file changed, 1 insertion(+) (limited to 'io.c') diff --git a/io.c b/io.c index 88811a9387..88979332ef 100644 --- a/io.c +++ b/io.c @@ -271,6 +271,7 @@ VALUE rb_io_get_write_io(VALUE io) { VALUE write_io; + rb_io_check_initialized(RFILE(io)->fptr); write_io = RFILE(io)->fptr->tied_io_for_writing; if (write_io) { return write_io; -- cgit v1.2.3