diff --git a/ChangeLog b/ChangeLog index 9135f4a551..2c0c808f13 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Thu Nov 21 16:51:34 2013 Zachary Scott + + * ext/digest/bubblebabble/bubblebabble.c: Teach RDoc digest/bubblebabble + Thu Nov 21 16:50:16 2013 Zachary Scott * test/digest/test_digest.rb: Add more tests for digest/bubblebabble diff --git a/ext/digest/bubblebabble/bubblebabble.c b/ext/digest/bubblebabble/bubblebabble.c index c92ae52cd9..4bccd221b8 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"); + rb_mDigest = rb_path2class("Digest"); + rb_mDigest_Instance = rb_path2class("Digest::Instance"); + rb_cDigest_Class = rb_path2class("Digest::Class"); - /* Digest::bubblebabble() */ - rb_define_module_function(mDigest, "bubblebabble", rb_digest_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::Class::bubblebabble() */ - rb_define_singleton_method(cDigest_Class, "bubblebabble", rb_digest_class_s_bubblebabble, -1); - - /* 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"); }