[MacRuby] #979: Find.find standard library broken in macirb
MacRuby
ruby-noreply at macosforge.org
Thu Oct 28 04:14:52 PDT 2010
#979: Find.find standard library broken in macirb
-----------------------------+----------------------------------------------
Reporter: lp@… | Owner: eloy.de.enige@…
Type: defect | Status: new
Priority: major | Milestone:
Component: MacRuby | Keywords: macirb standardlib
-----------------------------+----------------------------------------------
Comment(by eloy.de.enige@…):
I've reduced it a bit more. It seems that requiring the `find.rb' source
file *before* anything else makes it work. But if it's required from
within the IRB session it breaks, in a catch block, by returning the
{{{__FILE__}}} string that was given to eval.
The relevant code from find.rb:
{{{
$ cat f.rb
def find(file)
p file
catch(:prune) { p file }
end
}}}
Breaks when requiring the file from *within* the IRB session:
{{{
$ macirb
irb(main):001:0> require 'f'
=> true
irb(main):002:0> find('.')
"."
"(irb)"
}}}
Works when requiring the file *before* starting the IRB session:
{{{
$ macirb -r f.rb
irb(main):001:0> find('.')
"."
"."
}}}
--
Ticket URL: <http://www.macruby.org/trac/ticket/979#comment:3>
MacRuby <http://macruby.org/>
More information about the macruby-tickets
mailing list