[MacRuby] #1488: Pointer#cast! does not accept the alias of Pointer type.
MacRuby
ruby-noreply at macosforge.org
Mon Mar 26 18:44:50 PDT 2012
#1488: Pointer#cast! does not accept the alias of Pointer type.
----------------------------------+-----------------------------------------
Reporter: watson1978@… | Owner: lsansonetti@…
Type: defect | Status: new
Priority: major | Milestone:
Component: MacRuby | Keywords:
----------------------------------+-----------------------------------------
Pointer.new accept the alias of Pointer type.
{{{
$ macirb --simple-prompt
>> Pointer.new('i')
=> #<Pointer:0x4004a4100>
>> Pointer.new(:int) # alias of 'i'
=> #<Pointer:0x400777700>
}}}
But, Pointer#cast! does not accept.
{{{
>> po = Pointer.new(:int)
=> #<Pointer:0x400791760>
>> po.cast!(:uint) # alias of 'I'
TypeError: can't convert Symbol into String
>> po.cast!('I')
=> #<Pointer:0x400791760>
>> po.type
=> "I"
}}}
I think Pointer#cast! should accept the alias.
--
Ticket URL: <http://www.macruby.org/trac/ticket/1488>
MacRuby <http://macruby.org/>
More information about the macruby-tickets
mailing list