I haven't filed it yet this time since last time it turned out to be already fixed, but I'm not certain that's the case now. At any rate, it's being handled by different functions.
The same thing is happening - the return code being passed to my delegate (from [NSApplication endSheet:returnCode]) isn't being treated as the NSInteger it ought to be. At least I think so. Here's the trace, and you can see that the value 1(NSOKButton) is being treated as id, causing problems (0/NSCancelButton doesn't crash as it's a special case) :
Program received signal: “EXC_BAD_ACCESS”.
(gdb) bt
#0 rb_ocid_to_rval [inlined] () at /Users/parzival/devo/buried/MacRuby/trunk/include/ruby/ruby.h:1252
#1 0x0000000100130161 in rb_vm_ocval_to_rval (ocval=0x1) at compiler.cpp:6155
#2 0x000000010110537c in ?? ()
#3 0x00007fff820c29f9 in -[NSApplication endSheet:returnCode:] ()
#4 0x00007fff81fd523e in -[NSApplication sendAction:to:from:] ()
#5 0x00007fff81fd519d in -[NSControl sendAction:to:] ()
#6 0x00007fff8206068b in -[NSCell trackMouse:inRect:ofView:untilMouseUp:] ()
#7 0x00007fff820911a3 in -[NSButtonCell trackMouse:inRect:ofView:untilMouseUp:] ()
#8 0x00007fff8205f135 in -[NSControl mouseDown:] ()
#9 0x00007fff81f79967 in -[NSWindow sendEvent:] ()
#10 0x00007fff81eaf122 in -[NSApplication sendEvent:] ()
#11 0x00007fff81e45acc in -[NSApplication run] ()
#12 0x00007fff81e3e798 in NSApplicationMain ()
Attached are a few files as a test case, an NSWindowController subclass and MainMenu.nib that can be dropped into a new project to check this if anyone wants to. I recall when I first had this problem that I could see what the change was, but unfortunately I've forgotten that now.