diff options
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/test/cases/migrator_test.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/activerecord/test/cases/migrator_test.rb b/activerecord/test/cases/migrator_test.rb index f05ca900aa..9809d83315 100644 --- a/activerecord/test/cases/migrator_test.rb +++ b/activerecord/test/cases/migrator_test.rb @@ -357,11 +357,11 @@ class MigratorTest < ActiveRecord::TestCase end private - def m(name, version) + def m(name, version, &block) x = Sensor.new name, version x.extend(Module.new { - define_method(:up) { yield(:up, x); super() } - define_method(:down) { yield(:down, x); super() } + define_method(:up) { block.call(:up, x); super() } + define_method(:down) { block.call(:down, x); super() } }) if block_given? end |