mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* ext/digest/digest.c (rb_digest_instance_digest)
(rb_digest_instance_hexdigest): Save a method call of reset() for a disposable clone. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26336 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
441619b73c
commit
7bfdad3b62
2 changed files with 8 additions and 8 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
Sun Jan 17 22:48:44 2010 Akinori MUSHA <knu@iDaemons.org>
|
||||||
|
|
||||||
|
* ext/digest/digest.c (rb_digest_instance_digest)
|
||||||
|
(rb_digest_instance_hexdigest): Save a method call of reset()
|
||||||
|
for a disposable clone.
|
||||||
|
|
||||||
Sun Jan 17 19:24:25 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Sun Jan 17 19:24:25 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* math.c (domain_check): check errno first.
|
* math.c (domain_check): check errno first.
|
||||||
|
|
|
@ -179,10 +179,7 @@ rb_digest_instance_digest(int argc, VALUE *argv, VALUE self)
|
||||||
value = rb_funcall(self, id_finish, 0);
|
value = rb_funcall(self, id_finish, 0);
|
||||||
rb_funcall(self, id_reset, 0);
|
rb_funcall(self, id_reset, 0);
|
||||||
} else {
|
} else {
|
||||||
VALUE clone = rb_obj_clone(self);
|
value = rb_funcall(rb_obj_clone(self), id_finish, 0);
|
||||||
|
|
||||||
value = rb_funcall(clone, id_finish, 0);
|
|
||||||
rb_funcall(clone, id_reset, 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return value;
|
return value;
|
||||||
|
@ -227,10 +224,7 @@ rb_digest_instance_hexdigest(int argc, VALUE *argv, VALUE self)
|
||||||
value = rb_funcall(self, id_finish, 0);
|
value = rb_funcall(self, id_finish, 0);
|
||||||
rb_funcall(self, id_reset, 0);
|
rb_funcall(self, id_reset, 0);
|
||||||
} else {
|
} else {
|
||||||
VALUE clone = rb_obj_clone(self);
|
value = rb_funcall(rb_obj_clone(self), id_finish, 0);
|
||||||
|
|
||||||
value = rb_funcall(clone, id_finish, 0);
|
|
||||||
rb_funcall(clone, id_reset, 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return hexencode_str_new(value);
|
return hexencode_str_new(value);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue