From de5a85496ac4ae7bd24b5fc7acb8001a5e4d8b7d Mon Sep 17 00:00:00 2001 From: matz Date: Sat, 18 Sep 2004 06:56:38 +0000 Subject: * array.c (rb_ary_equal): element size might change during comparison. [ruby-dev:24254] * array.c (rb_ary_diff): ditto. [ruby-dev:24274] * array.c (rb_ary_select): ditto. [ruby-dev:24278] * array.c (rb_ary_delete): ditto. [ruby-dev:24283] * array.c (rb_ary_rindex): ditto. [ruby-dev:24275] * array.c (rb_ary_initialize): element size might change during initializing block. [ruby-dev:24284] * dir.c (dir_s_chdir): avoid memory leak and unnecessary chdir to the original directory when exception has caused in changing direcotry or within block. thanks to Johan Holmberg [ruby-core:03446] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6922 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/digest/digest.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'ext') diff --git a/ext/digest/digest.c b/ext/digest/digest.c index c570055322..70f986327a 100644 --- a/ext/digest/digest.c +++ b/ext/digest/digest.c @@ -149,8 +149,8 @@ rb_digest_base_copy(copy, obj) if (copy == obj) return copy; rb_check_frozen(copy); - algo = get_digest_base_metadata(CLASS_OF(copy)); - if (algo != get_digest_base_metadata(CLASS_OF(obj))) { + algo = get_digest_base_metadata(rb_obj_class(copy)); + if (algo != get_digest_base_metadata(rb_obj_class(obj))) { rb_raise(rb_eTypeError, "wrong argument class"); } Data_Get_Struct(obj, void, pctx1); @@ -168,7 +168,7 @@ rb_digest_base_update(self, str) void *pctx; StringValue(str); - algo = get_digest_base_metadata(CLASS_OF(self)); + algo = get_digest_base_metadata(rb_obj_class(self)); Data_Get_Struct(self, void, pctx); algo->update_func(pctx, RSTRING(str)->ptr, RSTRING(str)->len); @@ -201,7 +201,7 @@ rb_digest_base_digest(self) size_t len; VALUE str; - algo = get_digest_base_metadata(CLASS_OF(self)); + algo = get_digest_base_metadata(rb_obj_class(self)); Data_Get_Struct(self, void, pctx1); len = algo->ctx_size; @@ -232,7 +232,7 @@ rb_digest_base_hexdigest(self) size_t len; VALUE str; - algo = get_digest_base_metadata(CLASS_OF(self)); + algo = get_digest_base_metadata(rb_obj_class(self)); Data_Get_Struct(self, void, pctx1); len = algo->ctx_size; @@ -261,10 +261,10 @@ rb_digest_base_equal(self, other) VALUE klass; VALUE str1, str2; - klass = CLASS_OF(self); + klass = rb_obj_class(self); algo = get_digest_base_metadata(klass); - if (CLASS_OF(other) == klass) { + if (rb_obj_class(other) == klass) { void *pctx1, *pctx2; Data_Get_Struct(self, void, pctx1); -- cgit v1.2.3