summaryrefslogtreecommitdiff
path: root/test/digest
diff options
context:
space:
mode:
authorknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-10-13 11:58:05 +0000
committerknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-10-13 11:58:05 +0000
commitf678390e1f7e2e8556b160202a482baa64d67f9d (patch)
treecdfbc27af6b4d5c9e070cad6198d3f5dbcb6f0f2 /test/digest
parent5cafaa674431aeb3bdddca88867372adbc1dbc9c (diff)
* ext/digest/digest.c (Init_digest): Digest::Base.new() does no
longer take an initial string to feed. This change allows subclasses to take hashing parameters. A statement such as ``md = Digest::MD5.new(s)'' can be easily rewritten as ``md = Digest::MD5.new << s'' or ``md = Digest::MD5.new.update(s)''. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11154 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/digest')
-rw-r--r--test/digest/test_digest.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/digest/test_digest.rb b/test/digest/test_digest.rb
index 5cc9a99..fa12086 100644
--- a/test/digest/test_digest.rb
+++ b/test/digest/test_digest.rb
@@ -43,7 +43,8 @@ module TestDigest
def test_eq
# This test is also for clone()
- md1 = self.class::ALGO.new("ABC")
+ md1 = self.class::ALGO.new
+ md1 << "ABC"
assert_equal(md1, md1.clone, self.class::ALGO)