From c707e73ef8fa36a8b4e38e5e3d3f9726704004dc 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: http://svn.ruby-lang.org/repos/ruby/trunk@16757 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_io.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'test/ruby/test_io.rb') diff --git a/test/ruby/test_io.rb b/test/ruby/test_io.rb index 25ceb70be..6e6a27f01 100644 --- a/test/ruby/test_io.rb +++ b/test/ruby/test_io.rb @@ -1219,4 +1219,8 @@ class TestIO < Test::Unit::TestCase assert_equal("bar\n", File.read(t.path, 4, 4)) end + + def test_uninitialized + assert_raise(IOError) { IO.allocate.print "" } + end end -- cgit