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 eaaf996dbb..3f9854200d 100644 --- a/activerecord/test/cases/migrator_test.rb +++ b/activerecord/test/cases/migrator_test.rb @@ -346,11 +346,11 @@ module ActiveRecord 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 |