[MacRuby-devel] [MacRuby] #152: KVC arguments not properly marshalled
MacRuby
ruby-noreply at macosforge.org
Thu Nov 6 06:44:31 PST 2008
#152: KVC arguments not properly marshalled
-----------------------------+----------------------------------------------
Reporter: ben at tanjero.com | Owner: lsansonetti at apple.com
Type: defect | Status: new
Priority: blocker | Milestone:
Component: MacRuby | Keywords:
-----------------------------+----------------------------------------------
An argument isn’t being marshalled properly to mutable array KVC
accessors.
{{{
class KVCTest
def initialize; @a = []; end
def countOfThings; @a.size; end
def objectInThingsAtIndex(i); @a[i]; end
end
KVCTest.new.valueForKey 'things'
irb(main):015:0> KVCTest.new.valueForKey 'things'
TypeError: no implicit conversion from nil to integer
from (irb):11:in `[]'
from (irb):11:in `objectInThingsAtIndex'
from bin/irb:12:in `<main>'
}}}
Not sure why objectInThingsAtIndex: is getting a nil arg here.
--
Ticket URL: <http://www.macruby.org/trac/ticket/152>
MacRuby <http://macruby.org/>
More information about the MacRuby-devel
mailing list