forked from jruby/jruby
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix freeze/taint bug for cloned/dup'd objects add test cases git-svn-id: http://svn.codehaus.org/jruby/trunk/jruby@1526 961051c9-f516-0410-bf72-c9f7e237a7b7
- Loading branch information
Stefan Matthias Aust
committed
Dec 22, 2004
1 parent
bcba816
commit 49aa6e5
Showing
8 changed files
with
62 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
require 'test/minirunit' | ||
|
||
test_check "Test Taint" | ||
|
||
test_ok(Module.new.taint.dup.tainted?) | ||
test_ok(Class.new.taint.dup.tainted?) | ||
test_ok(Object.new.taint.dup.tainted?) | ||
test_ok(String.new.taint.dup.tainted?) | ||
test_ok([].taint.dup.tainted?) | ||
test_ok({}.taint.dup.tainted?) | ||
test_ok(//.taint.dup.tainted?) | ||
|
||
test_ok(Module.new.taint.clone.tainted?) | ||
test_ok(Class.new.taint.clone.tainted?) | ||
test_ok(Object.new.taint.clone.tainted?) | ||
test_ok(String.new.taint.clone.tainted?) | ||
test_ok([].taint.clone.tainted?) | ||
test_ok({}.taint.clone.tainted?) | ||
test_ok(//.taint.clone.tainted?) | ||
|
||
test_check "Test Freeze" | ||
|
||
test_ok(!Module.new.freeze.dup.frozen?) | ||
test_ok(!Class.new.freeze.dup.frozen?) | ||
test_ok(!Object.new.freeze.dup.frozen?) | ||
test_ok(!String.new.freeze.dup.frozen?) | ||
test_ok(![].freeze.dup.frozen?) | ||
test_ok(!{}.freeze.dup.frozen?) | ||
test_ok(!//.freeze.dup.frozen?) | ||
|
||
test_ok(Module.new.freeze.clone.frozen?) | ||
test_ok(Class.new.freeze.clone.frozen?) | ||
test_ok(Object.new.freeze.clone.frozen?) | ||
test_ok(String.new.freeze.clone.frozen?) | ||
test_ok([].freeze.clone.frozen?) | ||
test_ok({}.freeze.clone.frozen?) | ||
test_ok(//.freeze.clone.frozen?) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters