[Rubycocoa-devel 782] Re: Problem with Mocha (reduced to simple test script)

Zurück zum Archiv-Index

Laurent Sansonetti lsans****@apple*****
Wed Feb 28 08:27:41 JST 2007


On Feb 27, 2007, at 11:11 PM, kimura wataru wrote:

> Hi,
>
> I commited this fix as r1601. Please check out the latest revision.

Excellent, just one thing, is it possible to change

     klass.instance_eval {@ns_imported = true}

to

     klass.instance_variable_set(:@ns_imported, true)

?

# instance_eval is slow :(

> Then, test script reports 1 failure:
>  1) Failure:
>  test_direct_override(TC_OVMIX) [./tc_ovmix.rb:124]:
>  <nil>
>  expected to be kind_of?
>  <OSX::NSString> but was
>  <NilClass>.
>
> I think this test case must fail. The class DirectOverride defined
> in Objective-C world. If we expect RubyCocoa to auto-override methods
> for Objective-C classes, the following change of oc_import.rb is  
> needed.
>
> * remove checking objc-class or ruby-class at
>  NSBehaviorAttachment#_ns_enable_override?
>
> But I recognize to expect auto-overriding for objc classes. I'll try
> to make a patch for this change and some enhancement.

Cool, thanks!

Laurent

> On Tue, 27 Feb 2007 18:13:08 +0000, Chris Mcgrath wrote:
>> On 27 Feb 2007, at 15:05, kimura wataru wrote:
>>
>>
>>>
>>
>>> This behavior is a bug of RubyCocoa. RubyCocoa shold NOT treat a
>>
>>> metaclass of Cocoa classes as a subclass of Cocoa classes. I think
>>
>>> we can fix the problem soon.
>>
>> Great! :) Let me know if there is anything I can help with.
>>
>> Cheers,
>>
>> Chris
>
>
> -- 
> kimura wataru
> _______________________________________________
> Rubycocoa-devel mailing list
> Rubyc****@lists*****
> http://lists.sourceforge.jp/mailman/listinfo/rubycocoa-devel




More information about the Rubycocoa-devel mailing list
Zurück zum Archiv-Index