diff options
author | Neeraj Singh <neerajdotname@gmail.com> | 2010-05-19 23:43:39 -0400 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-05-21 16:00:55 +0200 |
commit | cc45a1068f7920454d6d3a1cdabf844f17417908 (patch) | |
tree | 3435a9cc0b374c6d1e416e6eb376cc5d6e61824f /activesupport/lib | |
parent | 1bc6b43f535d8b56cb6f25d36e7605d32cb0dd2e (diff) | |
download | rails-cc45a1068f7920454d6d3a1cdabf844f17417908.tar.gz rails-cc45a1068f7920454d6d3a1cdabf844f17417908.tar.bz2 rails-cc45a1068f7920454d6d3a1cdabf844f17417908.zip |
1.day should respond_to kind_of too
[#4656 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
Diffstat (limited to 'activesupport/lib')
-rw-r--r-- | activesupport/lib/active_support/duration.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/activesupport/lib/active_support/duration.rb b/activesupport/lib/active_support/duration.rb index db5afb5324..cd0d66a482 100644 --- a/activesupport/lib/active_support/duration.rb +++ b/activesupport/lib/active_support/duration.rb @@ -38,6 +38,7 @@ module ActiveSupport def is_a?(klass) #:nodoc: Duration == klass || value.is_a?(klass) end + alias :kind_of? :is_a? # Returns true if <tt>other</tt> is also a Duration instance with the # same <tt>value</tt>, or if <tt>other == value</tt>. |