aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-12-31 14:27:20 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-12-31 14:27:20 +0000
commitde3f2adb53561c99630478e8372326c0d0a63153 (patch)
treefdb5396870cf2d3b92dc410a0ce8d03ec43e13ce /test
parentaaf78dec43d85058d56dda5518fc757398ccf781 (diff)
downloadruby-de3f2adb53561c99630478e8372326c0d0a63153.tar.gz
* string.c (rb_str_resize): embeds if ptr is null. [ruby-dev:32819]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14817 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_string.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/ruby/test_string.rb b/test/ruby/test_string.rb
index 7af6dcd11c..5cdacf3483 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