aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext/date/acts_like.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport/lib/active_support/core_ext/date/acts_like.rb')
-rw-r--r--activesupport/lib/active_support/core_ext/date/acts_like.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/activesupport/lib/active_support/core_ext/date/acts_like.rb b/activesupport/lib/active_support/core_ext/date/acts_like.rb
new file mode 100644
index 0000000000..ea6cb38973
--- /dev/null
+++ b/activesupport/lib/active_support/core_ext/date/acts_like.rb
@@ -0,0 +1,9 @@
+require 'date'
+
+class Date
+ # Enable more predictable duck-typing on Date-like classes. See
+ # Object#acts_like?.
+ def acts_like_date?
+ true
+ end
+end