summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-08-31 07:11:29 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-08-31 07:11:29 +0000
commita102b685b93f0ce944c273e24f7d100e85777426 (patch)
tree882079486f52e2391afffcc099ec2d4f333bc698 /test
parentbea02d1b35a389cd70f349183776cc96be29abc2 (diff)
merge revision(s) 46368,46371: [Backport #9913]
* ext/digest/digest.c (rb_digest_instance_equal): fix #== for non-string arguments. [ruby-core:62967] [Bug #9913] * test/digest/test_digest.rb: add test for above. * ext/digest/digest.c (rb_digest_instance_equal): no need to call `to_s` twice. [Bug #9913] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@47333 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rwxr-xr-xtest/digest/test_digest.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/digest/test_digest.rb b/test/digest/test_digest.rb
index 4b1d55e256..7c990d4320 100755
--- a/test/digest/test_digest.rb
+++ b/test/digest/test_digest.rb
@@ -68,6 +68,9 @@ module TestDigest
assert_equal(md1, md1.clone, self.class::ALGO)
+ bug9913 = '[ruby-core:62967] [Bug #9913]'
+ assert_not_equal(md1, nil, bug9913)
+
md2 = self.class::ALGO.new
md2 << "A"