about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2011-03-01 08:57:16 +0000
committerEric Wong <normalperson@yhbt.net>2011-03-01 08:57:16 +0000
commitc44a8335b2f7ff60cf74730ac697a5e00829cc66 (patch)
tree8d18cb393640ccb3ab43ca97ed0f4dc9256d81a8
parentc885c2d30b69925f6dd9f36e74c247e650db327b (diff)
downloadruby_posix_mq-c44a8335b2f7ff60cf74730ac697a5e00829cc66.tar.gz
So private we won't mention them in the commit message!
-rw-r--r--ext/posix_mq/posix_mq.c6
-rw-r--r--lib/posix_mq.rb2
2 files changed, 4 insertions, 4 deletions
diff --git a/ext/posix_mq/posix_mq.c b/ext/posix_mq/posix_mq.c
index 2b979a7..e429525 100644
--- a/ext/posix_mq/posix_mq.c
+++ b/ext/posix_mq/posix_mq.c
@@ -1060,7 +1060,7 @@ void Init_posix_mq_ext(void)
 
         rb_define_singleton_method(cPOSIX_MQ, "unlink", s_unlink, 1);
 
-        rb_define_method(cPOSIX_MQ, "initialize", init, -1);
+        rb_define_private_method(cPOSIX_MQ, "initialize", init, -1);
         rb_define_method(cPOSIX_MQ, "send", my_send, -1);
         rb_define_method(cPOSIX_MQ, "<<", send0, 1);
         rb_define_method(cPOSIX_MQ, "trysend", trysend, -1);
@@ -1076,8 +1076,8 @@ void Init_posix_mq_ext(void)
         rb_define_method(cPOSIX_MQ, "name", name, 0);
         rb_define_method(cPOSIX_MQ, "notify=", setnotify, 1);
         rb_define_method(cPOSIX_MQ, "nonblock=", setnonblock, 1);
-        rb_define_method(cPOSIX_MQ, "notify_exec", setnotify_exec, 2);
-        rb_define_method(cPOSIX_MQ, "notify_cleanup", notify_cleanup, 0);
+        rb_define_private_method(cPOSIX_MQ, "notify_exec", setnotify_exec, 2);
+        rb_define_private_method(cPOSIX_MQ, "notify_cleanup", notify_cleanup, 0);
         rb_define_method(cPOSIX_MQ, "nonblock?", nonblock_p, 0);
 #ifdef MQD_TO_FD
         rb_define_method(cPOSIX_MQ, "to_io", to_io, 0);
diff --git a/lib/posix_mq.rb b/lib/posix_mq.rb
index 0048c26..60c63b6 100644
--- a/lib/posix_mq.rb
+++ b/lib/posix_mq.rb
@@ -51,7 +51,7 @@ class POSIX_MQ
     block.arity == 1 or
       raise ArgumentError, "arity of notify block must be 1"
     r, w = IO.pipe
-    self.notify_exec(w, Thread.new(block) do |blk|
+    notify_exec(w, Thread.new(block) do |blk|
       begin
         begin
           r.read(1) or raise Errno::EINTR