diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2010-01-07 00:05:06 -0800 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2010-01-07 00:06:20 -0800 |
commit | a323b83acfe6e02812ec3b7b4ce912b07c85220e (patch) | |
tree | a759544b3252bb3c27867771cc6bb30d65656ddc /activesupport/lib/active_support | |
parent | 816ba1e15a709337a99a931e80dddfe5bf972de5 (diff) | |
download | rails-a323b83acfe6e02812ec3b7b4ce912b07c85220e.tar.gz rails-a323b83acfe6e02812ec3b7b4ce912b07c85220e.tar.bz2 rails-a323b83acfe6e02812ec3b7b4ce912b07c85220e.zip |
Remove unneeded reliance on super -> method_missing quirk
Diffstat (limited to 'activesupport/lib/active_support')
-rw-r--r-- | activesupport/lib/active_support/duration.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/activesupport/lib/active_support/duration.rb b/activesupport/lib/active_support/duration.rb index c1f0e4bf81..887a40d35e 100644 --- a/activesupport/lib/active_support/duration.rb +++ b/activesupport/lib/active_support/duration.rb @@ -36,7 +36,7 @@ module ActiveSupport end def is_a?(klass) #:nodoc: - klass == Duration || super + Duration == klass || value.is_a?(klass) end # Returns true if <tt>other</tt> is also a Duration instance with the @@ -50,7 +50,9 @@ module ActiveSupport end def self.===(other) #:nodoc: - other.is_a?(Duration) rescue super + other.is_a?(Duration) + rescue NoMethodError + false end # Calculates a new Time or Date that is as far in the future |