no more need to make Time#to_date and Time#to_datetime public

they are public in actual 1.9 ruby version (tested at least in 1.9.2-p180)
This commit is contained in:
Sergey Nartimov 2011-12-22 18:53:04 +03:00
parent fa5adfb1e8
commit 9d97173c5a
4 changed files with 0 additions and 13 deletions

View File

@ -1,5 +1,4 @@
require 'date'
require 'active_support/core_ext/time/publicize_conversion_methods'
require 'active_support/core_ext/time/calculations'
class String

View File

@ -1,5 +1,4 @@
require 'active_support/inflector/methods'
require 'active_support/core_ext/time/publicize_conversion_methods'
require 'active_support/values/time_zone'
class Time

View File

@ -1,10 +0,0 @@
require 'date'
class Time
# Ruby 1.8-cvs and early 1.9 series define private Time#to_date
%w(to_date to_datetime).each do |method|
if private_instance_methods.include?(method) || private_instance_methods.include?(method.to_sym)
public method
end
end
end

View File

@ -13,7 +13,6 @@ end
require 'date'
require 'time'
require 'active_support/core_ext/time/publicize_conversion_methods'
require 'active_support/core_ext/time/marshal'
require 'active_support/core_ext/time/acts_like'
require 'active_support/core_ext/time/calculations'