aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext/time
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport/lib/active_support/core_ext/time')
-rw-r--r--activesupport/lib/active_support/core_ext/time/behavior.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/activesupport/lib/active_support/core_ext/time/behavior.rb b/activesupport/lib/active_support/core_ext/time/behavior.rb
new file mode 100644
index 0000000000..a5c0baacdf
--- /dev/null
+++ b/activesupport/lib/active_support/core_ext/time/behavior.rb
@@ -0,0 +1,13 @@
+module ActiveSupport #:nodoc:
+ module CoreExtensions #:nodoc:
+ module Time #:nodoc:
+ module Behavior
+ # Enable more predictable duck-typing on Time-like classes. See
+ # Object#acts_like?.
+ def acts_like_time?
+ true
+ end
+ end
+ end
+ end
+end