[MacRuby] #942: feature: Please implement Pointer#to_a, Pointer#each.

MacRuby ruby-noreply at macosforge.org
Thu Oct 7 19:52:37 PDT 2010


#942: feature: Please implement Pointer#to_a, Pointer#each.
----------------------------------+-----------------------------------------
 Reporter:  watson1978@…          |       Owner:  lsansonetti@…        
     Type:  enhancement           |      Status:  new                  
 Priority:  minor                 |   Milestone:                       
Component:  MacRuby               |    Keywords:                       
----------------------------------+-----------------------------------------

Comment(by lsansonetti@…):

 Making Pointer Enumerable? mmh, that's an idea. However some pointers do
 not have a size attribute, so it will not work for them.

 But for your use case, I wonder if it wouldn't make more sense to add a
 #to_str method on Pointer which returns a String object based on its
 content? (and raise an exception if the Pointer type is not character
 and/or if the pointer does not have a size attribute).

-- 
Ticket URL: <http://www.macruby.org/trac/ticket/942#comment:1>
MacRuby <http://macruby.org/>



More information about the macruby-tickets mailing list