diff options
Diffstat (limited to 'activesupport/lib')
-rw-r--r-- | activesupport/lib/active_support/cache.rb | 4 | ||||
-rw-r--r-- | activesupport/lib/active_support/core_ext/integer/multiple.rb | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/activesupport/lib/active_support/cache.rb b/activesupport/lib/active_support/cache.rb index ad238c1d96..6360a4614e 100644 --- a/activesupport/lib/active_support/cache.rb +++ b/activesupport/lib/active_support/cache.rb @@ -247,13 +247,13 @@ module ActiveSupport expires_in || 0 end - def instrument(operation, key, options, &block) + def instrument(operation, key, options) log(operation, key, options) if self.class.instrument payload = { :key => key } payload.merge!(options) if options.is_a?(Hash) - ActiveSupport::Notifications.instrument(:"cache_#{operation}", payload, &block) + ActiveSupport::Notifications.instrument("active_support.cache_#{operation}", payload){ yield } else yield end diff --git a/activesupport/lib/active_support/core_ext/integer/multiple.rb b/activesupport/lib/active_support/core_ext/integer/multiple.rb index 40bea54c67..8dff217ddc 100644 --- a/activesupport/lib/active_support/core_ext/integer/multiple.rb +++ b/activesupport/lib/active_support/core_ext/integer/multiple.rb @@ -1,6 +1,6 @@ class Integer # Check whether the integer is evenly divisible by the argument. def multiple_of?(number) - self % number == 0 + number != 0 ? self % number == 0 : zero? end end |