From: Lyle Johnson Date: 2002-05-31T04:24:57+09:00 Subject: Re: How to Create Protected Methods in C Extension? > I am writing a Ruby extension is C. Is there any way to make a method > protected or private (from the Ruby side, of course, not from the C > side, since it is not C++)? I scanned through "ruby.h" and found only > "rb_define_method" which seems to make all the methods public. Thanks. It's hiding in "intern.h" and not in "ruby.h": void rb_define_protected_method(VALUE klass, const char *methodname, VALUE (*func)(...), int nargs); void rb_define_private_method(VALUE klass, const char *methodname, VALUE (*func)(...), int nargs); Hope this helps, Lyle