From 7bb8f69a2e27adde03600b63369d9caae3b28dce Mon Sep 17 00:00:00 2001 From: Watson Date: Sun, 23 Mar 2014 02:37:54 +0900 Subject: [PATCH] fix a bug where nested array cannot be handled it cause an error If app.resources_dirs has nested array app.resources_dirs << ['Images'] ``` % rake rake aborted! no implicit conversion of Array into String /Library/RubyMotion/lib/motion/project/template/ios.rb:51:in `exists?' /Library/RubyMotion/lib/motion/project/template/ios.rb:51:in `block in pre_build_actions' /Library/RubyMotion/lib/motion/project/template/ios.rb:50:in `each' /Library/RubyMotion/lib/motion/project/template/ios.rb:50:in `pre_build_actions' /Library/RubyMotion/lib/motion/project/template/ios.rb:67:in `block (2 levels) in ' /Library/RubyMotion/lib/motion/project/template/ios.rb:122:in `block in ' Tasks: TOP => build:simulator (See full trace by running task with --trace) ``` --- lib/motion/project/template/ios.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/motion/project/template/ios.rb b/lib/motion/project/template/ios.rb index 7cd2b323..df2a8d31 100644 --- a/lib/motion/project/template/ios.rb +++ b/lib/motion/project/template/ios.rb @@ -47,7 +47,7 @@ namespace :build do # TODO this should go into a iOS specific Builder class which performs this # check before building. - App.config.resources_dirs.each do |dir| + App.config.resources_dirs.flatten.each do |dir| next unless Dir.exists?(dir) Dir.entries(dir).grep(/Resources/i).each do |basename| path = File.join(dir, basename)