aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/extend
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Homebrew/extend')
-rw-r--r--Library/Homebrew/extend/ENV/std.rb2
-rw-r--r--Library/Homebrew/extend/ENV/super.rb2
-rw-r--r--Library/Homebrew/extend/os/mac/utils/bottles.rb2
3 files changed, 3 insertions, 3 deletions
diff --git a/Library/Homebrew/extend/ENV/std.rb b/Library/Homebrew/extend/ENV/std.rb
index 4a871f9bb..a2e800803 100644
--- a/Library/Homebrew/extend/ENV/std.rb
+++ b/Library/Homebrew/extend/ENV/std.rb
@@ -200,7 +200,7 @@ module Stdenv
# @private
def set_cpu_flags(flags, default = DEFAULT_FLAGS, map = Hardware::CPU.optimization_flags)
cflags =~ /(-Xarch_#{Hardware::CPU.arch_32_bit} )-march=/
- xarch = $1.to_s
+ xarch = Regexp.last_match(1).to_s
remove flags, /(-Xarch_#{Hardware::CPU.arch_32_bit} )?-march=\S*/
remove flags, /( -Xclang \S+)+/
remove flags, /-mssse3/
diff --git a/Library/Homebrew/extend/ENV/super.rb b/Library/Homebrew/extend/ENV/super.rb
index ef41161af..692fd3623 100644
--- a/Library/Homebrew/extend/ENV/super.rb
+++ b/Library/Homebrew/extend/ENV/super.rb
@@ -266,7 +266,7 @@ module Superenv
def make_jobs
self["MAKEFLAGS"] =~ /-\w*j(\d+)/
- [$1.to_i, 1].max
+ [Regexp.last_match(1).to_i, 1].max
end
def universal_binary
diff --git a/Library/Homebrew/extend/os/mac/utils/bottles.rb b/Library/Homebrew/extend/os/mac/utils/bottles.rb
index c54e4e5b7..03980aab0 100644
--- a/Library/Homebrew/extend/os/mac/utils/bottles.rb
+++ b/Library/Homebrew/extend/os/mac/utils/bottles.rb
@@ -32,7 +32,7 @@ module Utils
# :tiger_g4, :tiger_g5, etc.
def find_altivec_tag(tag)
return unless tag.to_s =~ /(\w+)_(g4|g4e|g5)$/
- altivec_tag = "#{$1}_altivec".to_sym
+ altivec_tag = "#{Regexp.last_match(1)}_altivec".to_sym
altivec_tag if key?(altivec_tag)
end