aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew
diff options
context:
space:
mode:
authorJack Nagel2013-03-12 00:38:52 -0500
committerJack Nagel2013-03-12 00:38:52 -0500
commit79a67fd097f7e998ed29bad9c98174a82fec4da6 (patch)
tree2145919fbabd65263a9a30991cdd19c095a29d64 /Library/Homebrew
parent6197eae3d4eefd621c857773020c0c2a05e1674b (diff)
downloadbrew-79a67fd097f7e998ed29bad9c98174a82fec4da6.tar.bz2
Pass filename and lineno arguments to class_eval
Diffstat (limited to 'Library/Homebrew')
-rw-r--r--Library/Homebrew/formula.rb8
-rw-r--r--Library/Homebrew/formula_support.rb8
2 files changed, 8 insertions, 8 deletions
diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb
index 0a1847fa5..2186b4a74 100644
--- a/Library/Homebrew/formula.rb
+++ b/Library/Homebrew/formula.rb
@@ -667,11 +667,11 @@ private
def self.attr_rw(*attrs)
attrs.each do |attr|
- class_eval %Q{
+ class_eval <<-EOS, __FILE__, __LINE__ + 1
def #{attr}(val=nil)
val.nil? ? @#{attr} : @#{attr} = val
end
- }
+ EOS
end
end
@@ -679,7 +679,7 @@ private
attr_rw :plist_startup, :plist_manual
Checksum::TYPES.each do |cksum|
- class_eval %Q{
+ class_eval <<-EOS, __FILE__, __LINE__ + 1
def #{cksum}(val=nil)
unless val.nil?
@stable ||= SoftwareSpec.new
@@ -687,7 +687,7 @@ private
end
return @stable ? @stable.#{cksum} : @#{cksum}
end
- }
+ EOS
end
def build
diff --git a/Library/Homebrew/formula_support.rb b/Library/Homebrew/formula_support.rb
index 23472547f..4c044c53a 100644
--- a/Library/Homebrew/formula_support.rb
+++ b/Library/Homebrew/formula_support.rb
@@ -32,7 +32,7 @@ class SoftwareSpec
# The methods that follow are used in the block-form DSL spec methods
Checksum::TYPES.each do |cksum|
- class_eval %Q{
+ class_eval <<-EOS, __FILE__, __LINE__ + 1
def #{cksum}(val=nil)
if val.nil?
@checksum if @checksum.nil? or @checksum.hash_type == :#{cksum}
@@ -40,7 +40,7 @@ class SoftwareSpec
@checksum = Checksum.new(:#{cksum}, val)
end
end
- }
+ EOS
end
def url val=nil, specs={}
@@ -93,7 +93,7 @@ class Bottle < SoftwareSpec
# Checksum methods in the DSL's bottle block optionally take
# a Hash, which indicates the platform the checksum applies on.
Checksum::TYPES.each do |cksum|
- class_eval %Q{
+ class_eval <<-EOS, __FILE__, __LINE__ + 1
def #{cksum}(val=nil)
@#{cksum} ||= Hash.new
case val
@@ -111,7 +111,7 @@ class Bottle < SoftwareSpec
@cat_without_underscores = true
end
end
- }
+ EOS
end
def root_url val=nil