[MacRuby] #888: Compiled MacRuby can't read the DATA const for the text after __END__ in the source

MacRuby ruby-noreply at macosforge.org
Fri Sep 10 04:32:21 PDT 2010


#888: Compiled MacRuby can't read the DATA const for the text after __END__ in
the source
---------------------------------+------------------------------------------
 Reporter:  dev@…                |       Owner:  lsansonetti@…        
     Type:  defect               |      Status:  new                  
 Priority:  major                |   Milestone:                       
Component:  MacRuby              |    Keywords:                       
---------------------------------+------------------------------------------

Comment(by dev@…):

 Hum, I didn't know about this implementation detail. But so it is. You can
 even rewind it and read the whole source.

 It may not make sense indeed, since the source is (sometimes on purpose)
 gone after compilation, and bunch of files may be linked together.

 Maybe make the string after __END__ available through some other means? Or
 just tell programmers not to use the data section in compiled programs?

 In case of the latter, at least an attempt to access DATA should have a
 more meaningful error. Maybe provide an object in the DATA constant, but
 any attempt to call a method on it will raise and explain that DATA is
 unavailable to compiled code.

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



More information about the macruby-tickets mailing list