[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ruby-talk
Subject:    Re: extending an object
From:       Ross Bamford <rossrt () roscopeco ! co ! uk>
Date:       2006-02-27 9:45:22
Message-ID: 1141033470.4791.2.camel () jukebox ! roscopeco
[Download RAW message or body]

On Mon, 2006-02-27 at 16:16 +0900, Gerardo Santana Gómez Garrido wrote:
> I'm writing an extension for Ruby, and want to extend an object with
> methods from a module. I'm doing it like this:
> 
> rb_extend_object(self, rb_mAModuleExtension);
> 
> But the methods added to self become private. I want them public. How
> should this be done?

I think rb_extend_object retains the original access of module instance
methods, so you should need to just define them public in the module
you're extending.

-- 
Ross Bamford - rosco@roscopeco.REMOVE.co.uk



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic