diff options
author | Kuldeep Aggarwal <kd.engineer@yahoo.co.in> | 2013-11-15 00:53:57 +0530 |
---|---|---|
committer | Kuldeep Aggarwal <kd.engineer@yahoo.co.in> | 2013-11-15 00:53:57 +0530 |
commit | d3a1ce1cdc60d593de1682c5f4e3230c8db9a0fd (patch) | |
tree | 65004268d5092ecc56983a455603729d7476f148 /activerecord/test/cases | |
parent | 140c0c8881d100b0d0bc2a0bce1227ddfbd9c9bd (diff) | |
download | rails-d3a1ce1cdc60d593de1682c5f4e3230c8db9a0fd.tar.gz rails-d3a1ce1cdc60d593de1682c5f4e3230c8db9a0fd.tar.bz2 rails-d3a1ce1cdc60d593de1682c5f4e3230c8db9a0fd.zip |
Used Yield instead of block.call
Diffstat (limited to 'activerecord/test/cases')
-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 3f9854200d..eaaf996dbb 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, &block) + def m(name, version) x = Sensor.new name, version x.extend(Module.new { - define_method(:up) { block.call(:up, x); super() } - define_method(:down) { block.call(:down, x); super() } + define_method(:up) { yield(:up, x); super() } + define_method(:down) { yield(:down, x); super() } }) if block_given? end |