[macruby] #107: array arguments raise ArgumentError
#107: array arguments raise ArgumentError -------------------------------+-------------------------------------------- Reporter: toast@drtoast.com | Owner: lsansonetti@apple.com Type: defect | Status: new Priority: major | Milestone: Component: MacRuby | Keywords: -------------------------------+-------------------------------------------- In RubyCocoa I could do this: `cgcolor = CGColorCreate(colorspace,[1.0,1.0,1.0,1.0])` But the same thing in MacRuby gives me this error: `ArgumentError: can't convert Ruby object `[1.0, 1.0, 0.0, 1.0]' to Objective-C value of type `^f'` -- Ticket URL: <http://www.macruby.org/trac/ticket/107> macruby <http://macruby.org/>
#107: array arguments raise ArgumentError -------------------------------+-------------------------------------------- Reporter: toast@drtoast.com | Owner: lsansonetti@apple.com Type: defect | Status: closed Priority: major | Milestone: MacRuby 0.3 Component: MacRuby | Resolution: fixed Keywords: | -------------------------------+-------------------------------------------- Changes (by lsansonetti@apple.com): * status: new => closed * resolution: => fixed * milestone: => MacRuby 0.3 Comment: Fixed in trunk/r471. {{{ $ cat /tmp/t.rb framework 'Cocoa' colorspace = CGColorSpaceCreateWithName(KCGColorSpaceGenericRGB) color = CGColorCreate(colorspace,[0.123,0.456,0.789,0.0]) buf = CGColorGetComponents(color) p buf[0] p buf[1] p buf[2] p buf[3] $ macruby /tmp/t.rb 0.123000003397465 0.456000000238419 0.788999974727631 0.0 }}} -- Ticket URL: <http://www.macruby.org/trac/ticket/107#comment:1> macruby <http://macruby.org/>
participants (1)
-
macruby