diff options
author | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-07-26 15:32:28 +0000 |
---|---|---|
committer | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-07-26 15:32:28 +0000 |
commit | 1201652aced9da0d6f578bc707d77ee5017d3295 (patch) | |
tree | c0cac59a4f29c9a1ad7f77457378f89b06f7b1c6 /test/ruby/test_io.rb | |
parent | 12265cfd3dcf0e188d7d2d332641cc5e4288f92b (diff) | |
download | ruby-1201652aced9da0d6f578bc707d77ee5017d3295.tar.gz ruby-1201652aced9da0d6f578bc707d77ee5017d3295.tar.xz ruby-1201652aced9da0d6f578bc707d77ee5017d3295.zip |
merges r24203 from trunk into ruby_1_9_1.
--
* io.c (io_read): should taint the result. [ruby-dev:38826]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_9_1@24290 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_io.rb')
-rw-r--r-- | test/ruby/test_io.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/ruby/test_io.rb b/test/ruby/test_io.rb index 776cf3414..04c0b5553 100644 --- a/test/ruby/test_io.rb +++ b/test/ruby/test_io.rb @@ -1368,4 +1368,10 @@ class TestIO < Test::Unit::TestCase } } end + + def test_tainted + t = make_tempfile + assert(File.read(t.path, 4).tainted?, '[ruby-dev:38826]') + assert(File.open(t.path) {|f| f.read(4)}.tainted?, '[ruby-dev:38826]') + end end |