diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2012-07-17 10:30:28 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2012-07-17 10:30:28 -0700 |
commit | 939f014bdf7f37602941b4b67fd2015ee26b1766 (patch) | |
tree | 9a0ec0ee94395944207a5788094fbba0522ffbee /activerecord | |
parent | d0ba994f54a4fcf72362535ec0692d4d228d8421 (diff) | |
parent | 414008f98e6eefb6efe14a93b6a969fbae3d339f (diff) | |
download | rails-939f014bdf7f37602941b4b67fd2015ee26b1766.tar.gz rails-939f014bdf7f37602941b4b67fd2015ee26b1766.tar.bz2 rails-939f014bdf7f37602941b4b67fd2015ee26b1766.zip |
Merge pull request #7076 from kennyj/fix_class_eval
Fix class_eval without __FILE__ and __LINE__.
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/test/cases/associations/has_many_associations_test.rb | 4 | ||||
-rw-r--r-- | activerecord/test/cases/attribute_methods_test.rb | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/activerecord/test/cases/associations/has_many_associations_test.rb b/activerecord/test/cases/associations/has_many_associations_test.rb index 477bb91412..bd850ce690 100644 --- a/activerecord/test/cases/associations/has_many_associations_test.rb +++ b/activerecord/test/cases/associations/has_many_associations_test.rb @@ -1467,7 +1467,7 @@ class HasManyAssociationsTest < ActiveRecord::TestCase def test_defining_has_many_association_with_delete_all_dependency_lazily_evaluates_target_class ActiveRecord::Reflection::AssociationReflection.any_instance.expects(:class_name).never - class_eval <<-EOF + class_eval(<<-EOF, __FILE__, __LINE__ + 1) class DeleteAllModel < ActiveRecord::Base has_many :nonentities, :dependent => :delete_all end @@ -1476,7 +1476,7 @@ class HasManyAssociationsTest < ActiveRecord::TestCase def test_defining_has_many_association_with_nullify_dependency_lazily_evaluates_target_class ActiveRecord::Reflection::AssociationReflection.any_instance.expects(:class_name).never - class_eval <<-EOF + class_eval(<<-EOF, __FILE__, __LINE__ + 1) class NullifyModel < ActiveRecord::Base has_many :nonentities, :dependent => :nullify end diff --git a/activerecord/test/cases/attribute_methods_test.rb b/activerecord/test/cases/attribute_methods_test.rb index fe385feb4a..aa0cdf5dfb 100644 --- a/activerecord/test/cases/attribute_methods_test.rb +++ b/activerecord/test/cases/attribute_methods_test.rb @@ -816,7 +816,7 @@ class AttributeMethodsTest < ActiveRecord::TestCase end def privatize(method_signature) - @target.class_eval <<-private_method + @target.class_eval(<<-private_method, __FILE__, __LINE__ + 1) private def #{method_signature} "I'm private" |