From cc419af3e1650de369e26433a21198750373db85 Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Tue, 30 Sep 2014 17:38:46 -0500 Subject: [PATCH] ruby: extract abi_version method --- Formula/ruby.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Formula/ruby.rb b/Formula/ruby.rb index 80cdbf9ef1..6dcb050b42 100644 --- a/Formula/ruby.rb +++ b/Formula/ruby.rb @@ -69,7 +69,11 @@ class Ruby < Formula # Customize rubygems to look/install in the global gem directory # instead of in the Cellar, making gems last across reinstalls - (lib/"ruby/2.1.0/rubygems/defaults/operating_system.rb").write rubygems_config + (lib/"ruby/#{abi_version}/rubygems/defaults/operating_system.rb").write rubygems_config + end + + def abi_version + "2.1.0" end def rubygems_config; <<-EOS.undent @@ -86,7 +90,7 @@ class Ruby < Formula "lib", "ruby", "gems", - "2.1.0" + "#{abi_version}" ] @default_dir ||= File.join(*path)