[前][次][番号順一覧][スレッド一覧]

ruby-changes:31675

From: zzak <ko1@a...>
Date: Thu, 21 Nov 2013 16:53:45 +0900 (JST)
Subject: [ruby-changes:31675] zzak:r43754 (trunk): * ext/digest/bubblebabble/bubblebabble.c: Teach RDoc digest/bubblebabble

zzak	2013-11-21 16:53:39 +0900 (Thu, 21 Nov 2013)

  New Revision: 43754

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=43754

  Log:
    * ext/digest/bubblebabble/bubblebabble.c: Teach RDoc digest/bubblebabble

  Modified files:
    trunk/ChangeLog
    trunk/ext/digest/bubblebabble/bubblebabble.c
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 43753)
+++ ChangeLog	(revision 43754)
@@ -1,3 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Thu Nov 21 16:51:34 2013  Zachary Scott  <e@z...>
+
+	* ext/digest/bubblebabble/bubblebabble.c: Teach RDoc digest/bubblebabble
+
 Thu Nov 21 16:50:16 2013  Zachary Scott  <e@z...>
 
 	* test/digest/test_digest.rb: Add more tests for digest/bubblebabble
Index: ext/digest/bubblebabble/bubblebabble.c
===================================================================
--- ext/digest/bubblebabble/bubblebabble.c	(revision 43753)
+++ ext/digest/bubblebabble/bubblebabble.c	(revision 43754)
@@ -78,7 +78,8 @@ bubblebabble_str_new(VALUE str_digest) https://github.com/ruby/ruby/blob/trunk/ext/digest/bubblebabble/bubblebabble.c#L78
     return str;
 }
 
-/*
+/* Document-method: Digest::bubblebabble
+ *
  * call-seq:
  *     Digest.bubblebabble(string) -> bubblebabble_string
  *
@@ -90,7 +91,8 @@ rb_digest_s_bubblebabble(VALUE klass, VA https://github.com/ruby/ruby/blob/trunk/ext/digest/bubblebabble/bubblebabble.c#L91
     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, https://github.com/ruby/ruby/blob/trunk/ext/digest/bubblebabble/bubblebabble.c#L104
     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 se https://github.com/ruby/ruby/blob/trunk/ext/digest/bubblebabble/bubblebabble.c#L124
 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);
-
-    /* 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_mDigest = rb_path2class("Digest");
+    rb_mDigest_Instance = rb_path2class("Digest::Instance");
+    rb_cDigest_Class = rb_path2class("Digest::Class");
+
+#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
+
+    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");
 }

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]