diff options
Diffstat (limited to 'Library/Homebrew/brew.rb')
| -rw-r--r-- | Library/Homebrew/brew.rb | 4 | 
1 files changed, 4 insertions, 0 deletions
diff --git a/Library/Homebrew/brew.rb b/Library/Homebrew/brew.rb index 2deba9a51..15c1ee4ff 100644 --- a/Library/Homebrew/brew.rb +++ b/Library/Homebrew/brew.rb @@ -1,5 +1,9 @@  std_trap = trap("INT") { exit! 130 } # no backtrace thanks +# check ruby version before requiring any modules. +RUBY_TWO = RUBY_VERSION.split(".").first.to_i >= 2 +raise "Homebrew must be run under Ruby 2!" unless RUBY_TWO +  require "pathname"  HOMEBREW_LIBRARY_PATH = Pathname.new(__FILE__).realpath.parent  $:.unshift(HOMEBREW_LIBRARY_PATH.to_s)  | 
