From 6fd0418ca6a44ce7a93ff6bfc44e620b8c0eff9d Mon Sep 17 00:00:00 2001 From: nobu Date: Mon, 31 Dec 2007 14:27:20 +0000 Subject: * string.c (rb_str_resize): embeds if ptr is null. [ruby-dev:32819] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@14817 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_string.rb | 3 +++ 1 file changed, 3 insertions(+) (limited to 'test/ruby') diff --git a/test/ruby/test_string.rb b/test/ruby/test_string.rb index 7af6dcd11..5cdacf348 100644 --- a/test/ruby/test_string.rb +++ b/test/ruby/test_string.rb @@ -368,6 +368,9 @@ class TestString < Test::Unit::TestCase assert_equal(a.tainted?, b.tainted?) end end + + null = File.exist?("/dev/null") ? "/dev/null" : "NUL" # maybe DOSISH + assert_equal("", File.read(null).clone, '[ruby-dev:32819] reported by Kazuhiro NISHIYAMA') end def test_concat -- cgit