
Both the `CctoolsMachO` and `RubyMachO` module implement a common set of methods that simplify querying `mach_data`. Move these into a shared module, that gets included after either of these implementations is loaded and included in `Pathname`.
14 lines
229 B
Ruby
14 lines
229 B
Ruby
require "os/mac/shared_mach"
|
|
|
|
class Pathname
|
|
if ENV["HOMEBREW_RUBY_MACHO"]
|
|
require "os/mac/ruby_mach"
|
|
include RubyMachO
|
|
else
|
|
require "os/mac/cctools_mach"
|
|
include CctoolsMachO
|
|
end
|
|
|
|
include SharedMachO
|
|
end
|