Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Changeset 6099

Show
Ignore:
Timestamp:
02/01/07 18:06:16 (2 years ago)
Author:
bitsweat
Message:

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

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/activesupport/CHANGELOG

    r6076 r6099  
    11*SVN* 
     2 
     3* Ruby 1.8-cvs and 1.9 define a private Time#to_date that overrides Active 
     4Support. Make it public to preserve compatibility.  [Jeremy Kemper] 
    25 
    36* Full test coverage for Inflector.  #7228 [Dan Kubb] 
  • trunk/activesupport/lib/active_support/core_ext/time.rb

    r5951 r6099  
     1require 'date' 
     2require 'time' 
     3 
     4# Ruby 1.8-cvs and 1.9 define private Time#to_date 
     5class Time 
     6  %w(to_date to_datetime).each do |method| 
     7    public method if private_instance_methods.include?(method) 
     8  end 
     9end 
     10 
    111require File.dirname(__FILE__) + '/time/behavior' 
    212require File.dirname(__FILE__) + '/time/calculations' 
  • trunk/activesupport/lib/active_support/core_ext/time/conversions.rb

    r5628 r6099  
    1 require 'date' 
    2 require 'time' 
    3  
    41module ActiveSupport #:nodoc: 
    52  module CoreExtensions #:nodoc: