summaryrefslogtreecommitdiff
path: root/ext/digest
diff options
context:
space:
mode:
authorzzak <zzak@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-11-21 07:53:39 (GMT)
committerzzak <zzak@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-11-21 07:53:39 (GMT)
commit8a53b57584ac54b0789f272f9efde81a1f87e68d (patch)
tree480f14b6dc0b762416b5fee68af54bf67c59f9a1 /ext/digest
parent671dbfdda8b132db3f5379c9f5506b0b2fceb4a5 (diff)
* ext/digest/bubblebabble/bubblebabble.c: Teach RDoc digest/bubblebabble
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43754 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/digest')
-rw-r--r--ext/digest/bubblebabble/bubblebabble.c32
1 files changed, 18 insertions, 14 deletions
diff --git a/ext/digest/bubblebabble/bubblebabble.c b/ext/digest/bubblebabble/bubblebabble.c
index c92ae52..4bccd22 100644
--- a/ext/digest/bubblebabble/bubblebabble.c
+++ b/ext/digest/bubblebabble/bubblebabble.c
@@ -78,7 +78,8 @@ bubblebabble_str_new(VALUE str_digest)
return str;
}
-/*
+/* Document-method: Digest::bubblebabble
+ *
* call-seq:
* Digest.bubblebabble(string) -> bubblebabble_string
*
@@ -90,7 +91,8 @@ rb_digest_s_bubblebabble(VALUE klass, VALUE str)
return bubblebabble_str_new(str);
}
-/*
+/* Document-method: Digest::Class::bubblebabble
+ *
* call-seq:
* Digest::Class.bubblebabble(string, ...) -> hash_string
*
@@ -102,7 +104,8 @@ rb_digest_class_s_bubblebabble(int argc, VALUE *argv, VALUE klass)
return bubblebabble_str_new(rb_funcall2(klass, id_digest, argc, argv));
}
-/*
+/* Document-method: Digest::Instance#bubblebabble
+ *
* call-seq:
* digest_obj.bubblebabble -> hash_string
*
@@ -121,22 +124,23 @@ rb_digest_instance_bubblebabble(VALUE self)
void
Init_bubblebabble(void)
{
- VALUE mDigest, mDigest_Instance, cDigest_Class;
+ VALUE rb_mDigest, rb_mDigest_Instance, rb_cDigest_Class;
rb_require("digest");
- mDigest = rb_path2class("Digest");
- mDigest_Instance = rb_path2class("Digest::Instance");
- cDigest_Class = rb_path2class("Digest::Class");
-
- /* Digest::bubblebabble() */
- rb_define_module_function(mDigest, "bubblebabble", rb_digest_s_bubblebabble, 1);
+ rb_mDigest = rb_path2class("Digest");
+ rb_mDigest_Instance = rb_path2class("Digest::Instance");
+ rb_cDigest_Class = rb_path2class("Digest::Class");
- /* Digest::Class::bubblebabble() */
- rb_define_singleton_method(cDigest_Class, "bubblebabble", rb_digest_class_s_bubblebabble, -1);
+#if 0
+ rb_mDigest = rb_define_module("Digest");
+ rb_mDigest_Instance = rb_define_module_under(rb_mDigest, "Instance");
+ rb_cDigest_Class = rb_define_class_under(rb_mDigest, "Class", rb_cObject);
+#endif
- /* Digest::Instance#bubblebabble() */
- rb_define_method(mDigest_Instance, "bubblebabble", rb_digest_instance_bubblebabble, 0);
+ rb_define_module_function(rb_mDigest, "bubblebabble", rb_digest_s_bubblebabble, 1);
+ rb_define_singleton_method(rb_cDigest_Class, "bubblebabble", rb_digest_class_s_bubblebabble, -1);
+ rb_define_method(rb_mDigest_Instance, "bubblebabble", rb_digest_instance_bubblebabble, 0);
id_digest = rb_intern("digest");
}