#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:
include_path = File.dirname(File.expand_path($0))[[BR]] include_path = File.dirname(include_path) if File.basename(include_path) == 'lib'[[BR]] Dir.glob("#{include_path}/**/**").each do |f|[[BR]] next if !File.directory?(f)[[BR]] '''next if f =~ /\.app/''' #Do not traverse Application directory structure.[[BR]] NSLog("'#{f}'")[[BR]] $LOAD_PATH << f[[BR]] 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:2> MacRuby <http://macruby.org/>