From 646f94adfef333c9ec5451fca55078de06ada3c0 Mon Sep 17 00:00:00 2001 From: Xu Cheng Date: Fri, 16 Oct 2015 17:08:11 +0800 Subject: [PATCH] move mach.rb to os/mac/mach.rb --- Library/Homebrew/extend/pathname.rb | 3 --- Library/Homebrew/os/mac.rb | 1 + Library/Homebrew/os/mac/hardware.rb | 2 +- Library/Homebrew/{ => os/mac}/mach.rb | 0 Library/Homebrew/os/mac/pathname.rb | 5 +++++ 5 files changed, 7 insertions(+), 4 deletions(-) rename Library/Homebrew/{ => os/mac}/mach.rb (100%) create mode 100644 Library/Homebrew/os/mac/pathname.rb diff --git a/Library/Homebrew/extend/pathname.rb b/Library/Homebrew/extend/pathname.rb index 95002d20f3..9708879e95 100644 --- a/Library/Homebrew/extend/pathname.rb +++ b/Library/Homebrew/extend/pathname.rb @@ -1,13 +1,10 @@ require "pathname" -require "mach" require "resource" require "metafiles" # Homebrew extends Ruby's `Pathname` to make our code more readable. # @see http://ruby-doc.org/stdlib-1.8.7/libdoc/pathname/rdoc/Pathname.html Ruby's Pathname API class Pathname - include MachO - # @private BOTTLE_EXTNAME_RX = /(\.[a-z0-9_]+\.bottle\.(\d+\.)?tar\.gz)$/ diff --git a/Library/Homebrew/os/mac.rb b/Library/Homebrew/os/mac.rb index 691f92b519..3568f71588 100644 --- a/Library/Homebrew/os/mac.rb +++ b/Library/Homebrew/os/mac.rb @@ -2,6 +2,7 @@ require "hardware" require "os/mac/version" require "os/mac/xcode" require "os/mac/xquartz" +require "os/mac/pathname" module OS module Mac diff --git a/Library/Homebrew/os/mac/hardware.rb b/Library/Homebrew/os/mac/hardware.rb index db4fe58758..5643416c81 100644 --- a/Library/Homebrew/os/mac/hardware.rb +++ b/Library/Homebrew/os/mac/hardware.rb @@ -1,4 +1,4 @@ -require "mach" +require "os/mac/mach" module MacCPUs OPTIMIZATION_FLAGS = { diff --git a/Library/Homebrew/mach.rb b/Library/Homebrew/os/mac/mach.rb similarity index 100% rename from Library/Homebrew/mach.rb rename to Library/Homebrew/os/mac/mach.rb diff --git a/Library/Homebrew/os/mac/pathname.rb b/Library/Homebrew/os/mac/pathname.rb new file mode 100644 index 0000000000..9b65d7ac02 --- /dev/null +++ b/Library/Homebrew/os/mac/pathname.rb @@ -0,0 +1,5 @@ +require "os/mac/mach" + +class Pathname + include MachO +end