1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Ruby 1.8-cvs and 1.9 define a private Time#to_date that overrides Active Support. Make it public to preserve compatibility.

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6099 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
Jeremy Kemper 2007-02-01 18:06:16 +00:00
parent 416091d8b5
commit 593b1b837d
3 changed files with 13 additions and 3 deletions

View file

@ -1,5 +1,8 @@
*SVN*
* Ruby 1.8-cvs and 1.9 define a private Time#to_date that overrides Active
Support. Make it public to preserve compatibility. [Jeremy Kemper]
* Full test coverage for Inflector. #7228 [Dan Kubb]
* :db format for Date#to_s [Jeremy Kemper]

View file

@ -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'

View file

@ -1,6 +1,3 @@
require 'date'
require 'time'
module ActiveSupport #:nodoc:
module CoreExtensions #:nodoc:
module Time #:nodoc: