From 474d77e21cbf3c0b2f0770f993774d8b9edce856 Mon Sep 17 00:00:00 2001 From: Adam Vandenberg Date: Tue, 25 Feb 2014 06:14:40 -0800 Subject: ruby: use Formula[] --- Library/Formula/ruby.rb | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'Library/Formula') diff --git a/Library/Formula/ruby.rb b/Library/Formula/ruby.rb index 4baaff375..045c1732e 100644 --- a/Library/Formula/ruby.rb +++ b/Library/Formula/ruby.rb @@ -42,14 +42,13 @@ class Ruby < Formula args << "--disable-install-doc" unless build.with? "doc" args << "--disable-dtrace" unless MacOS::CLT.installed? - paths = [] + paths = [ + Formula["libyaml"].opt_prefix, + Formula["openssl"].opt_prefix + ] - paths.concat %w[readline gdbm gmp libffi].map { |dep| - Formula.factory(dep).opt_prefix if build.with? dep - }.compact - - paths.concat %w[libyaml openssl].map { |dep| - Formula.factory(dep).opt_prefix + %w[readline gdbm gmp libffi].each { |dep| + paths << Formula[dep].opt_prefix if build.with? dep } args << "--with-opt-dir=#{paths.join(":")}" -- cgit v1.2.3