diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2013-11-14 11:29:28 -0800 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2013-11-14 11:29:28 -0800 |
commit | 84961dc5df86c70504bdcdc218799e9f848a7a00 (patch) | |
tree | 14b7072cf0eb29cfb57cdadb2f70d51f454db7de /activerecord | |
parent | a23bf6f55a2bea50ec39cc744e17c924d727c089 (diff) | |
parent | d3a1ce1cdc60d593de1682c5f4e3230c8db9a0fd (diff) | |
download | rails-84961dc5df86c70504bdcdc218799e9f848a7a00.tar.gz rails-84961dc5df86c70504bdcdc218799e9f848a7a00.tar.bz2 rails-84961dc5df86c70504bdcdc218799e9f848a7a00.zip |
Merge pull request #12889 from kuldeepaggarwal/speed_ups
Used Yield instead of block.call
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 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 |