[MacRuby] #979: Find.find standard library broken in macirb

MacRuby ruby-noreply at macosforge.org
Thu Oct 28 04:46:17 PDT 2010


#979: Find.find standard library broken in macirb
-----------------------------+----------------------------------------------
 Reporter:  lp@…             |       Owner:  lsansonetti@…        
     Type:  defect           |      Status:  new                  
 Priority:  major            |   Milestone:                       
Component:  MacRuby          |    Keywords:  binding __FILE__     
-----------------------------+----------------------------------------------
Changes (by eloy.de.enige@…):

  * keywords:  macirb standardlib => binding __FILE__
  * owner:  eloy.de.enige@… => lsansonetti@…


Comment:

 Ok, more reduction work, no more IRB files are being loaded:

 {{{
 $ cat f.rb
 def find(file)
   p file
   catch(:prune) { p file }
 end

 cat t3.rb
 # Loading the library before evalling makes it work
 # require "f"

 source = 'require "f"; find(".")'

 file = "(foo)"
 eval(source, TOPLEVEL_BINDING, file)

 # Renaming the `file' variable makes it all work again
 # source_file = "(foo)"
 # eval(source, TOPLEVEL_BINDING, source_file)
 }}}

 {{{
 $ macruby t3.rb
 "."
 "(foo)"
 }}}

 With a different variable name than `file':
 {{{
 $ macruby t3.rb
 "."
 "."
 }}}

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



More information about the macruby-tickets mailing list