diff options
author | michal <michal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-09-04 09:21:07 +0000 |
---|---|---|
committer | michal <michal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-09-04 09:21:07 +0000 |
commit | f9e8a5ebcdd8b07b9120a5c29a18aa15f3c7d6c0 (patch) | |
tree | 3ffd51473a2ecfd80a7fa5651651becb1c127d00 /ext | |
parent | 8f757a89faca700618194684d3beaad34ba91e27 (diff) | |
download | ruby-f9e8a5ebcdd8b07b9120a5c29a18aa15f3c7d6c0.tar.gz ruby-f9e8a5ebcdd8b07b9120a5c29a18aa15f3c7d6c0.tar.xz ruby-f9e8a5ebcdd8b07b9120a5c29a18aa15f3c7d6c0.zip |
Fix rb_digest_base_become (ruby-core:428)
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@2789 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r-- | ext/digest/digest.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/ext/digest/digest.c b/ext/digest/digest.c index 49991dd97..e86188886 100644 --- a/ext/digest/digest.c +++ b/ext/digest/digest.c @@ -147,15 +147,14 @@ rb_digest_base_become(copy, obj) { algo_t *algo; void *pctx1, *pctx2; - VALUE klass; if (copy = obj) return copy; rb_check_frozen(copy); - algo = get_digest_base_metadata(CLASS_OF(klass)); + algo = get_digest_base_metadata(CLASS_OF(copy)); if (algo != get_digest_base_metadata(CLASS_OF(obj))) { rb_raise(rb_eTypeError, "wrong argument class"); } - Data_Get_Struct(copy, void, pctx1); + Data_Get_Struct(obj, void, pctx1); Data_Get_Struct(copy, void, pctx2); memcpy(pctx2, pctx1, algo->ctx_size); |