[MacRuby-devel] [MacRuby] #470: String comparison issues hotcocoa project

MacRuby ruby-noreply at macosforge.org
Wed Jun 16 13:04:37 PDT 2010


#470: String comparison issues hotcocoa project
-----------------------------+----------------------------------------------
 Reporter:  tvmoore@…        |       Owner:  rich@…            
     Type:  defect           |      Status:  new               
 Priority:  major            |   Milestone:                    
Component:  MacRuby          |    Keywords:  String issue      
-----------------------------+----------------------------------------------
Description changed by martinlagardette@…:

Old description:

> {{{
> #!ruby
> include_path = File.dirname(File.expand_path($0))
> include_path = File.dirname(include_path) if File.basename(include_path)
> == 'lib'
> Dir.glob("#{include_path}/**/**").each do |f|
>   next if !File.directory?(f)
>   next if f =~ /\.app/   #Do not traverse Application directory
> structure.
>   NSLog("'#{f}'")
>   $LOAD_PATH << f
> end
>
> `next if f =~ /\.app/` this line of code works fine using macruby -d
> option but fails using macrake.
>
> I have also tried `f.index(".app")` and `f.rangeOfString(".app").length
> == 0` all work in macruby -d and all fail after macrake. When I say fail
> this line does not evaluate correctly and hence the paths are not loaded
> which fails when requiring other classes within project. I am currently
> using a nightly build 30-11-09.

New description:

 {{{
 #!ruby
 include_path = File.dirname(File.expand_path($0))
 include_path = File.dirname(include_path) if File.basename(include_path)
 == 'lib'
 Dir.glob("#{include_path}/**/**").each do |f|
   next if !File.directory?(f)
   next if f =~ /\.app/   #Do not traverse Application directory structure.
   NSLog("'#{f}'")
   $LOAD_PATH << f
 end
 }}}

 `next if f =~ /\.app/` this line of code works fine using macruby -d
 option but fails using macrake.

 I have also tried `f.index(".app")` and `f.rangeOfString(".app").length ==
 0` all work in macruby -d and all fail after macrake. When I say fail this
 line does not evaluate correctly and hence the paths are not loaded which
 fails when requiring other classes within project. I am currently using a
 nightly build 30-11-09.

--

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



More information about the MacRuby-devel mailing list