From 61cf11247bfdb243625cda93fb08afaacebe1381 Mon Sep 17 00:00:00 2001 From: Emilio Tagua Date: Wed, 29 Sep 2010 13:23:05 -0300 Subject: Use detect instead select to avoid "sh: [mysqldump]: command not found". MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: José Valim --- activerecord/examples/performance.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activerecord/examples') diff --git a/activerecord/examples/performance.rb b/activerecord/examples/performance.rb index ccd60c6c69..c4ce361b5d 100644 --- a/activerecord/examples/performance.rb +++ b/activerecord/examples/performance.rb @@ -88,7 +88,7 @@ else ) end - mysqldump_bin = %w[mysqldump mysqldump5].select { |bin| `which #{bin}`.length > 0 } + mysqldump_bin = %w[mysqldump mysqldump5].detect { |bin| `which #{bin}`.length > 0 } `#{mysqldump_bin} -u #{conn[:username]} #{"-p#{conn[:password]}" unless conn[:password].blank?} #{conn[:database]} exhibits users > #{sqlfile}` end -- cgit v1.2.3