diff options
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/extend/os/mac/system_config.rb | 11 | ||||
| -rw-r--r-- | Library/Homebrew/system_config.rb | 14 | 
2 files changed, 16 insertions, 9 deletions
| diff --git a/Library/Homebrew/extend/os/mac/system_config.rb b/Library/Homebrew/extend/os/mac/system_config.rb index 4a06d07ef..4c9ca552b 100644 --- a/Library/Homebrew/extend/os/mac/system_config.rb +++ b/Library/Homebrew/extend/os/mac/system_config.rb @@ -28,14 +28,8 @@ class SystemConfig        "#{MacOS::XQuartz.version} => #{describe_path(MacOS::XQuartz.prefix)}"      end -    def describe_system_ruby -      s = "" -      case RUBY_VERSION -      when /^1\.[89]/, /^2\.0/ -        s << "#{RUBY_VERSION}-p#{RUBY_PATCHLEVEL}" -      else -        s << RUBY_VERSION -      end +    def describe_homebrew_ruby +      s = describe_homebrew_ruby_version        if RUBY_PATH.to_s !~ %r{^/System/Library/Frameworks/Ruby.framework/Versions/[12]\.[089]/usr/bin/ruby}          s << " => #{RUBY_PATH}" @@ -45,7 +39,6 @@ class SystemConfig      def dump_verbose_config(f = $stdout)        dump_generic_verbose_config(f) -      f.puts "System Ruby: #{describe_system_ruby}"        f.puts "OS X: #{MacOS.full_version}-#{kernel}"        f.puts "Xcode: #{xcode ? xcode : "N/A"}"        f.puts "CLT: #{clt ? clt : "N/A"}" diff --git a/Library/Homebrew/system_config.rb b/Library/Homebrew/system_config.rb index 26a0c27ab..516c9c20a 100644 --- a/Library/Homebrew/system_config.rb +++ b/Library/Homebrew/system_config.rb @@ -85,6 +85,19 @@ class SystemConfig        end      end +    def describe_homebrew_ruby_version +      case RUBY_VERSION +      when /^1\.[89]/, /^2\.0/ +        "#{RUBY_VERSION}-p#{RUBY_PATCHLEVEL}" +      else +        RUBY_VERSION +      end +    end + +    def describe_homebrew_ruby +      "#{describe_homebrew_ruby_version} => #{RUBY_PATH}" +    end +      def hardware        return if Hardware::CPU.type == :dunno        "CPU: #{Hardware.cores_as_words}-core #{Hardware::CPU.bits}-bit #{Hardware::CPU.family}" @@ -129,6 +142,7 @@ class SystemConfig        f.puts "HOMEBREW_CELLAR: #{HOMEBREW_CELLAR}"        f.puts "HOMEBREW_BOTTLE_DOMAIN: #{BottleSpecification::DEFAULT_DOMAIN}"        f.puts hardware if hardware +      f.puts "Homebrew Ruby: #{describe_homebrew_ruby}"        f.puts "GCC-4.0: build #{gcc_40}" if gcc_40        f.puts "GCC-4.2: build #{gcc_42}" if gcc_42        f.puts "Clang: #{clang ? "#{clang} build #{clang_build}" : "N/A"}" | 
