diff options
| author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-07-19 08:32:44 +0000 |
|---|---|---|
| committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-07-19 08:32:44 +0000 |
| commit | f08c879a20d0ada0e9e1170ccff24ef361f4768c (patch) | |
| tree | 11936a3d17872dba8c56a5fd9c156bbfa25ef191 /test/ruby | |
| parent | a6c76cd0bb62ff763b491a3cb64cb1b2611cac8d (diff) | |
| download | ruby-f08c879a20d0ada0e9e1170ccff24ef361f4768c.tar.gz ruby-f08c879a20d0ada0e9e1170ccff24ef361f4768c.tar.xz ruby-f08c879a20d0ada0e9e1170ccff24ef361f4768c.zip | |
* io.c (io_read): should taint the result. [ruby-dev:38826]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24203 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
| -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 42614e00c..ab893dbfd 100644 --- a/test/ruby/test_io.rb +++ b/test/ruby/test_io.rb @@ -1457,4 +1457,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 |
