#470: String comparison issues hotcocoa project -----------------------------+---------------------------------------------- Reporter: tvmo...@… | Owner: r...@… Type: defect | Status: new Priority: major | Milestone: Component: MacRuby | Keywords: String issue -----------------------------+---------------------------------------------- Description changed by martinlagarde...@…:
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/> _______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel