public
Description: Ruby on Rails
Homepage: http://rubyonrails.org
Clone URL: git://github.com/rails/rails.git
Merge [6099] from trunk. Compatibility with Ruby 1.8.6: make private 
Time#to_date and #to_datetime public.

git-svn-id: 
http://svn-commit.rubyonrails.org/rails/branches/1-2-stable@6281 
5ecf4fe2-1ee6-0310-87b1-e25e094e27de
jeremy (author)
Fri Mar 02 03:08:52 -0800 2007
commit  bbe3dea3fa46355095818d193c7b74d03638ef5d
tree    c4c1dbcdad5efec6e4dfd3433f20f0b6c2622200
parent  9679cb4d979240aacbc3bd8e22a17942627d3414
...
1
2
 
 
 
3
4
5
...
1
2
3
4
5
6
7
8
0
@@ -1,5 +1,8 @@
0
 *SVN*
0
 
0
+* Ruby 1.8.6 and 1.9 define private Time#to_date and #to_datetime; make them
0
+public for compatibility. [Jeremy Kemper]
0
+
0
 * Deprecation: warn on stderr if RAILS_DEFAULT_LOGGER isn't set yet. [Jeremy Kemper]
0
 
0
 
...
 
 
 
 
 
 
 
 
 
 
1
2
3
...
1
2
3
4
5
6
7
8
9
10
11
12
13
0
@@ -1,3 +1,13 @@
0
+require 'date'
0
+require 'time'
0
+
0
+# Ruby 1.8-cvs and 1.9 define private Time#to_date
0
+class Time
0
+ %w(to_date to_datetime).each do |method|
0
+ public method if private_instance_methods.include?(method)
0
+ end
0
+end
0
+
0
 require File.dirname(__FILE__) + '/time/calculations'
0
 require File.dirname(__FILE__) + '/time/conversions'
0
 
...
1
2
3
4
5
6
...
 
 
 
1
2
3
0
@@ -1,6 +1,3 @@
0
-require 'date'
0
-require 'time'
0
-
0
 module ActiveSupport #:nodoc:
0
   module CoreExtensions #:nodoc:
0
     module Time #:nodoc:

Comments

    No one has commented yet.