summaryrefslogtreecommitdiff
path: root/ext/digest/digest.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/digest/digest.c')
-rw-r--r--ext/digest/digest.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/ext/digest/digest.c b/ext/digest/digest.c
index 49991dd97d..e86188886e 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);