summaryrefslogtreecommitdiff
path: root/test/ruby/test_hash.rb
diff options
context:
space:
mode:
authorshugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-06-13 05:41:44 +0000
committershugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-06-13 05:41:44 +0000
commit1474dd064b28e4a813a79342c5523cede60f83c7 (patch)
tree18eed509f9c6e01f993948b733c165f6006a2450 /test/ruby/test_hash.rb
parent90026ab53f89304438d907c0c7cc23afccc6edb7 (diff)
* test/-ext-/test_printf.rb, test/rss/test_parser.rb,
test/ruby/test_array.rb, test/ruby/test_hash.rb, test/ruby/test_m17n.rb, test/ruby/test_marshal.rb, test/ruby/test_object.rb, test/ruby/test_string.rb: don't use untrusted?, untrust, and trust to avoid warnings in case $VERBOSE is true. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41271 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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 3168760670..75a3a396af 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