Projects

Ticket #218 (closed defect: fixed)

Opened 3 years ago

Last modified 2 years ago

including a module which defines functions can mask functions of the same name in the including class

Reported by: celtic@… Owned by: lsansonetti@…
Priority: major Milestone: MacRuby 0.5
Component: MacRuby Keywords:
Cc:

Description

Simple explanation: classes A and B both define methods foo', as does module M. A includes M before defining its own foo', whereas B includes M afterwards.

Given that A and B both call super' in their foo', it turns out that only A's `foo' ends up calling M's, whereas B's does not.

Conclusion: including the module which defines the method after defining ones own causes it to be lost. I believe this is causes the problem first referred to in #215.

Attaching a test case which verifies this behaviour.

Attachments

module_inclusion_order_breaks_218.diff Download (1.5 KB) - added by celtic@… 3 years ago.
tests initialize and an arbitrary method, just to be sure

Change History

Changed 3 years ago by celtic@…

tests initialize and an arbitrary method, just to be sure

Changed 3 years ago by celtic@…

I've been trying to git bisect this with little success (I think it's my fault); in the meantime, I believe objc.m's rb_objc_register_ruby_method likely has the issue. Will look further.

Changed 2 years ago by lsansonetti@…

  • milestone set to MacRuby 0.5

Sorry for the late response. Could you try this with trunk? I believe it might work.

Changed 2 years ago by lsansonetti@…

  • status changed from new to closed
  • resolution set to fixed

Closing.

Note: See TracTickets for help on using tickets.