From c44a8335b2f7ff60cf74730ac697a5e00829cc66 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 1 Mar 2011 08:57:16 +0000 Subject: [PATCH] make methods that should be private, private So private we won't mention them in the commit message! --- ext/posix_mq/posix_mq.c | 6 +++--- lib/posix_mq.rb | 2 +- 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 -- 2.11.4.GIT