summaryrefslogtreecommitdiff
path: root/test/ruby/test_hash.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_hash.rb')
-rw-r--r--test/ruby/test_hash.rb49
1 files changed, 20 insertions, 29 deletions
diff --git a/test/ruby/test_hash.rb b/test/ruby/test_hash.rb
index 31687606706..75a3a396af9 100644
--- a/test/ruby/test_hash.rb
+++ b/test/ruby/test_hash.rb
@@ -226,20 +226,16 @@ class TestHash < Test::Unit::TestCase
def test_clone
for taint in [ false, true ]
- for untrust in [ false, true ]
- for frozen in [ false, true ]
- a = @h.clone
- a.taint if taint
- a.untrust if untrust
- a.freeze if frozen
- b = a.clone
-
- assert_equal(a, b)
- assert_not_same(a, b)
- assert_equal(a.frozen?, b.frozen?)
- assert_equal(a.untrusted?, b.untrusted?)
- assert_equal(a.tainted?, b.tainted?)
- end
+ for frozen in [ false, true ]
+ a = @h.clone
+ a.taint if taint
+ a.freeze if frozen
+ b = a.clone
+
+ assert_equal(a, b)
+ assert_not_same(a, b)
+ assert_equal(a.frozen?, b.frozen?)
+ assert_equal(a.tainted?, b.tainted?)
end
end
end
@@ -319,19 +315,16 @@ class TestHash < Test::Unit::TestCase
def test_dup
for taint in [ false, true ]
- for untrust in [ false, true ]
- for frozen in [ false, true ]
- a = @h.dup
- a.taint if taint
- a.freeze if frozen
- b = a.dup
-
- assert_equal(a, b)
- assert_not_same(a, b)
- assert_equal(false, b.frozen?)
- assert_equal(a.tainted?, b.tainted?)
- assert_equal(a.untrusted?, b.untrusted?)
- end
+ for frozen in [ false, true ]
+ a = @h.dup
+ a.taint if taint
+ a.freeze if frozen
+ b = a.dup
+
+ assert_equal(a, b)
+ assert_not_same(a, b)
+ assert_equal(false, b.frozen?)
+ assert_equal(a.tainted?, b.tainted?)
end
end
end
@@ -651,10 +644,8 @@ class TestHash < Test::Unit::TestCase
h = @cls[ 1=>2, 3=>4, 5=>6 ]
h.taint
- h.untrust
a = h.to_a
assert_equal(true, a.tainted?)
- assert_equal(true, a.untrusted?)
end
def test_to_hash