mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
This commit is contained in:
parent
671dbfdda8
commit
8a53b57584
2 changed files with 22 additions and 14 deletions
|
@ -1,3 +1,7 @@
|
|||
Thu Nov 21 16:51:34 2013 Zachary Scott <e@zzak.io>
|
||||
|
||||
* ext/digest/bubblebabble/bubblebabble.c: Teach RDoc digest/bubblebabble
|
||||
|
||||
Thu Nov 21 16:50:16 2013 Zachary Scott <e@zzak.io>
|
||||
|
||||
* test/digest/test_digest.rb: Add more tests for digest/bubblebabble
|
||||
|
|
|
@ -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");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue