From: Adam Shelly Date: 2008-05-21T14:42:49+09:00 Subject: Re: Local Jump Error On Tue, May 20, 2008 at 9:31 PM, Clement Ow wrote: > I get the following error when i execute my code: >>>c:/ruby/lib/ruby/1.8/Find.rb:39:in `find': no block given (LocalJumpError) > > A snippet of my code is as follows: > > if $file_exception[i] != nil > src1 = $file_exception[i].inject(Find.find(src)) {|result, > ex|result.reject{|x| File.basename(x) =~ Regexp.new(ex, > Regexp::IGNORECASE)}} > Is there something wrong with my code at all? (maybe i overlooked > something very simple) The error message is telling you exactly what you overlooked: find takes a block, not an argument. You probably want Find.find{|val|val==src} -Adam