aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2010-11-17 13:44:26 -0800
committerAaron Patterson <aaron.patterson@gmail.com>2010-11-17 14:26:35 -0800
commit974ff0dd43826aa375417852356ceede1bd24cf2 (patch)
tree8d5e1524836bd52cf314711a5f53b3c8a2d0948c /activerecord/lib/active_record
parent0bea9fd6be1c82154d7b2d4adbfc690a2c1df297 (diff)
downloadrails-974ff0dd43826aa375417852356ceede1bd24cf2.tar.gz
rails-974ff0dd43826aa375417852356ceede1bd24cf2.tar.bz2
rails-974ff0dd43826aa375417852356ceede1bd24cf2.zip
singleton method added is no longer needed
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r--activerecord/lib/active_record/migration.rb20
1 files changed, 1 insertions, 19 deletions
diff --git a/activerecord/lib/active_record/migration.rb b/activerecord/lib/active_record/migration.rb
index 390c24c2f2..936e9a19a2 100644
--- a/activerecord/lib/active_record/migration.rb
+++ b/activerecord/lib/active_record/migration.rb
@@ -332,7 +332,7 @@ module ActiveRecord
end
result = nil
- time = Benchmark.measure { result = send("#{direction}") }
+ time = Benchmark.measure { result = send(direction) }
case direction
when :up then announce "migrated (%.4fs)" % time.real; write
@@ -342,24 +342,6 @@ module ActiveRecord
result
end
- # Because the method added may do an alias_method, it can be invoked
- # recursively. We use @ignore_new_methods as a guard to indicate whether
- # it is safe for the call to proceed.
- def singleton_method_added(sym) #:nodoc:
- return if defined?(@ignore_new_methods) && @ignore_new_methods
-
- begin
- @ignore_new_methods = true
-
- case sym
- when :up, :down
- singleton_class.send(:alias_method_chain, sym, "benchmarks")
- end
- ensure
- @ignore_new_methods = false
- end
- end
-
def write(text="")
puts(text) if verbose
end