mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
This commit is contained in:
parent
8a5dd664e7
commit
7eb625425c
5 changed files with 94 additions and 11 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue