Projects

Ticket #562 (new defect)

Opened 2 years ago

Last modified 4 months ago

Including a module into class Class or class Module

Reported by: eloy.de.enige@… Owned by: lsansonetti@…
Priority: blocker Milestone: MacRuby 1.0
Component: MacRuby Keywords: mocha #reduction #patch
Cc: james@…, ernest.prabhakar@…

Description (last modified by eloy.de.enige@…) (diff)

I saw that when you open class Class and define a method, it's automatically defined as a class method on NSObject. This does not happen when you include a module into class Class. Or class Module for that matter.

My preliminary patch does this for both Class and Module. However, as the test in #3300 shows, using the two behaviors together still leads to a problem.

Attachments

include_in_class_or_module.diff Download (1.5 KB) - added by eloy.de.enige@… 2 years ago.
562.rb Download (77 bytes) - added by emil@… 14 months ago.
reduction

Change History

Changed 2 years ago by eloy.de.enige@…

Changed 2 years ago by eloy.de.enige@…

  • description modified (diff)

Changed 2 years ago by eloy.de.enige@…

As a note, the current patch fixes tickets #265 and #371.

Changed 21 months ago by james@…

  • cc james@… added

Cc Me!

Changed 21 months ago by james@…

Is this resolved or is it still awaiting a fix for the problem alluded to in the test in #3300 ? This ticket doesn't seem to exist. Thanks, James.

Changed 21 months ago by lsansonetti@…

Looks like this bug, #265, #371 and #709 are all related. The patch eloy wrote has not been merged yet AFAIK. I will work on this then verify if each ticket can be closed.

(I am not sure why you refer to #3300. We don't have that many tickets.)

Changed 21 months ago by james@…

Hi Laurent. That'd be great. #3300 is mentioned in the 2nd paragraph of the description on this ticket - "However, as the test in #3300 shows, using the two behaviors together still leads to a problem". Thanks, James.

Changed 21 months ago by eloy.de.enige@…

Heh, my bad, that had to be r3300 :)

Changed 21 months ago by james@…

Aha. I don't know why I didn't think of that!

Changed 14 months ago by eloy.de.enige@…

In my opinion this should be fixed for 1.0, as being able to use libs such as Mocha is (for me) pretty important. But I'll wait for Laurent to review it.

Changed 14 months ago by emil@…

reduction

Changed 14 months ago by emil@…

reduction show problem on trunk rev 4976

Changed 14 months ago by eloy.de.enige@…

  • keywords #reduction #patch added
  • milestone set to MacRuby 1.0

Changed 4 months ago by ernest.prabhakar@…

Any update? Did this patch ever make it in? I'm wondering if this explains some weird include behavior I'm seeing...

Changed 4 months ago by ernest.prabhakar@…

  • cc ernest.prabhakar@… added

Cc Me!

Note: See TracTickets for help on using tickets.