From cd516cbbe0fcb4b567bdf8be495260ebb632a8b9 Mon Sep 17 00:00:00 2001 From: yugui Date: Sun, 26 Jul 2009 15:32:28 +0000 Subject: merges r24203 from trunk into ruby_1_9_1. -- * io.c (io_read): should taint the result. [ruby-dev:38826] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@24290 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_io.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'test') diff --git a/test/ruby/test_io.rb b/test/ruby/test_io.rb index 776cf34147..04c0b55533 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 -- cgit v1.2.3