[MacRuby] #207: Kernel#framework calls global #copy method while loading Cocoa.
#207: Kernel#framework calls global #copy method while loading Cocoa. -------------------------------------+-------------------------------------- Reporter: eloy.de.enige@… | Owner: lsansonetti@… Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: -------------------------------------+-------------------------------------- This is something I stumbled across when playing with Rake. I have isolated it to the following: {{{ % macirb irb(main):001:0> module Kernel irb(main):002:1> def copy(*args) p args; end irb(main):003:1> end => nil irb(main):004:0> framework "Foundation" => true irb(main):005:0> framework "Cocoa" [] [] [] [] [] [] => true }}} It also breaks if the arity of the #copy method is specified: {{{ % macirb irb(main):001:0> module Kernel irb(main):002:1> def copy(one_arg); end irb(main):003:1> end => nil irb(main):004:0> framework 'Cocoa' ArgumentError: wrong number of arguments (0 for 1) from (irb):4:in `framework' from (irb):4 from /usr/local/bin/macirb:12:in `<main>' }}} So it seems like something is being evaluated which calls a #copy method while loading frameworks. -- Ticket URL: <http://www.macruby.org/trac/ticket/207> MacRuby <http://macruby.org/>
#207: Kernel#framework calls global #copy method while loading Cocoa. -------------------------------------+-------------------------------------- Reporter: eloy.de.enige@… | Owner: lsansonetti@… Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: -------------------------------------+-------------------------------------- Comment(by lsansonetti@…): This is because Kernel is included in NSObject and that the new method conflicts with -[NSObject copy]. MacRuby should not try to override these methods. -- Ticket URL: <http://www.macruby.org/trac/ticket/207#comment:1> MacRuby <http://macruby.org/>
participants (1)
-
MacRuby