Projects

Ticket #661 (closed defect: fixed)

Opened 22 months ago

Last modified 22 months ago

[NSUndoManager um.prepareWithInvocationTarget:] is broken

Reported by: lsansonetti@… Owned by: lsansonetti@…
Priority: blocker Milestone: MacRuby 0.6
Component: MacRuby Keywords:
Cc:

Description

Looks like NSUndoManager's proxy functionality is broken with trunk. This used to work before, unfortunately since the spec got tagged we did not see the regression.

Here is a reduction from the spec:

framework 'Foundation'

um = NSUndoManager.new
p um.object_id

$ary = []
class Foo
  def foo
    $ary << 42
  end
end
o = Foo.new
p o.object_id

um.prepareWithInvocationTarget(o).foo

p $ary
um.undo
p $ary

Change History

Changed 22 months ago by lsansonetti@…

Thibault found that the regression was introduced by r3934.

Changed 22 months ago by martinlagardette@…

Regression appeared with r3934

Changed 22 months ago by martinlagardette@…

Oops, for some reason your comment was not displayed before I posted mine, even though that was 10 hours ago... mmmh. Or maybe I just didn't see it. Anyway, we really need a way to delete trac comments :D

Changed 22 months ago by lsansonetti@…

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

Fixed in r3953.

Note: See TracTickets for help on using tickets.