aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext/time.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport/lib/active_support/core_ext/time.rb')
-rw-r--r--activesupport/lib/active_support/core_ext/time.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/activesupport/lib/active_support/core_ext/time.rb b/activesupport/lib/active_support/core_ext/time.rb
index a802c065a7..a9e6a4385c 100644
--- a/activesupport/lib/active_support/core_ext/time.rb
+++ b/activesupport/lib/active_support/core_ext/time.rb
@@ -1,3 +1,13 @@
+require 'date'
+require 'time'
+
+# Ruby 1.8-cvs and 1.9 define private Time#to_date
+class Time
+ %w(to_date to_datetime).each do |method|
+ public method if private_instance_methods.include?(method)
+ end
+end
+
require File.dirname(__FILE__) + '/time/behavior'
require File.dirname(__FILE__) + '/time/calculations'
require File.dirname(__FILE__) + '/time/conversions'