aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorMarcel Molina <marcel@vernix.org>2005-11-21 09:34:10 +0000
committerMarcel Molina <marcel@vernix.org>2005-11-21 09:34:10 +0000
commit119155bebbaf02a0f9540e3bcbdec5e4d3efc636 (patch)
tree04d6c79623a0904200d28e13ed5d971ad1e2b393 /activerecord
parent5177333e70cbb454679041b939fd074f166a38b8 (diff)
downloadrails-119155bebbaf02a0f9540e3bcbdec5e4d3efc636.tar.gz
rails-119155bebbaf02a0f9540e3bcbdec5e4d3efc636.tar.bz2
rails-119155bebbaf02a0f9540e3bcbdec5e4d3efc636.zip
Revert [3130]. Behavior of introducing Kernel.binding causes breakage.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3142 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/CHANGELOG2
-rwxr-xr-xactiverecord/lib/active_record/callbacks.rb2
-rwxr-xr-xactiverecord/lib/active_record/validations.rb4
3 files changed, 3 insertions, 5 deletions
diff --git a/activerecord/CHANGELOG b/activerecord/CHANGELOG
index c4f3c09e70..041eafe65b 100644
--- a/activerecord/CHANGELOG
+++ b/activerecord/CHANGELOG
@@ -1,7 +1,5 @@
*SVN*
-* Use Kernel.binding rather than binding to allow columns of that name. #2973 [arc@uchicago.edu]
-
* Add tasks to create, drop and rebuild the MySQL and PostgreSQL test databases. [Marcel Molina Jr.]
* Correct boolean handling in generated reader methods. #2945 [don.park@gmail.com, Stefan Kaes]
diff --git a/activerecord/lib/active_record/callbacks.rb b/activerecord/lib/active_record/callbacks.rb
index d8b088041f..aa3aa2d1a5 100755
--- a/activerecord/lib/active_record/callbacks.rb
+++ b/activerecord/lib/active_record/callbacks.rb
@@ -332,7 +332,7 @@ module ActiveRecord
when Symbol
self.send(callback)
when String
- eval(callback, Kernel.binding)
+ eval(callback, binding)
when Proc, Method
callback.call(self)
else
diff --git a/activerecord/lib/active_record/validations.rb b/activerecord/lib/active_record/validations.rb
index bb5a69941a..b6c9647b78 100755
--- a/activerecord/lib/active_record/validations.rb
+++ b/activerecord/lib/active_record/validations.rb
@@ -254,7 +254,7 @@ module ActiveRecord
def evaluate_condition(condition, record)
case condition
when Symbol: record.send(condition)
- when String: eval(condition, Kernel.binding)
+ when String: eval(condition, binding)
else
if condition_block?(condition)
condition.call(record)
@@ -764,7 +764,7 @@ module ActiveRecord
if validation.is_a?(Symbol)
self.send(validation)
elsif validation.is_a?(String)
- eval(validation, Kernel.binding)
+ eval(validation, binding)
elsif validation_block?(validation)
validation.call(self)
elsif validation_class?(validation, validation_method)