summaryrefslogtreecommitdiff
path: root/ext/digest
diff options
context:
space:
mode:
authorknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-10-18 04:26:06 +0000
committerknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-10-18 04:26:06 +0000
commit74cacd0df4e6c6a504969d7eb10e76676a607fa3 (patch)
treed1da2a75e0970eb4c8a2204ccd5e884b42d5a816 /ext/digest
parent0a8d8b8a684dc66669c6b2add3637c78673a97fe (diff)
* ext/digest/digest.c (rb_digest_class_init): Define
Digest::Class.new(). [Feature #3954] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29528 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/digest')
-rw-r--r--ext/digest/digest.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/ext/digest/digest.c b/ext/digest/digest.c
index 29ac36f..6f9149c 100644
--- a/ext/digest/digest.c
+++ b/ext/digest/digest.c
@@ -415,6 +415,13 @@ rb_digest_class_s_hexdigest(int argc, VALUE *argv, VALUE klass)
return hexencode_str_new(rb_funcall2(klass, id_digest, argc, argv));
}
+/* :nodoc: */
+static VALUE
+rb_digest_class_init(VALUE self)
+{
+ return self;
+}
+
/*
* Document-class: Digest::Base
*
@@ -622,6 +629,7 @@ Init_digest(void)
* class Digest::Class
*/
rb_cDigest_Class = rb_define_class_under(rb_mDigest, "Class", rb_cObject);
+ rb_define_method(rb_cDigest_Class, "initialize", rb_digest_class_init, 0);
rb_include_module(rb_cDigest_Class, rb_mDigest_Instance);
/* class methods */