[Rubycocoa-devel 225] Re: Automatic ns_overrides?

Back to archive index

kimura wataru kimur****@i*****
Thu Mar 9 23:59:18 JST 2006


On Wed, 8 Mar 2006 17:55:22 +0000, Jonathan Paisley wrote:
> On 8 Mar 2006, at 15:35, kimura wataru wrote:
> 
>>  I tested samples of RubyCocoa with removing ns_override. It seems
>>  the samples runs without any problems.
> 
> It seems fine for me too.
> 
thanks, I'll commit this later.

> One thing I noticed in the updated code:
> 
>      def ns_overrides(*args)
>        # In Ruby 1.8 (after 2002.9.27), this method may be called more
>        # first than 'Class#inherited'.
>        ns_inherited()
> 
> i.e., in case ns_overrides gets called before 'ns_inherited' then  
> ns_inherited gets called first.
> 
> For the new method_missing code, _ns_behavior_method_added won't call  
> ns_overrides unless ns_inherited has been called (due to the check in  
> _ns_enable_override?).
> 
> Does this mean that if, for some reason, method_added is called  
> before 'inherited' then ns_override will not get executed?
> 
> Sorry that this isn't very clear :)
> 
I guess this comment means the change of 
[ruby-devel:19287](eval.c:1.337). 
This change was reverted before release of 1.8.0 [ruby-devel:19291]
(eval.c:1.376). So, I think we can remove this comment and ns_inherited.

I tested tc_subclass.rb on ruby-1.8.0 with removing this 
ns_inherited and got a good result. 

-- 
kimuwa wataru



More information about the Rubycocoa-devel mailing list
Back to archive index