diff options
author | Mikel Lindsaar <raasdnil@gmail.com> | 2010-06-08 00:10:11 -0400 |
---|---|---|
committer | Mikel Lindsaar <raasdnil@gmail.com> | 2010-06-08 00:10:11 -0400 |
commit | e404490f9bae102f8c7126917d59568e6d1fef79 (patch) | |
tree | 34a4fd7517026ab23498e7d2301f27ebd75cdee2 /activesupport/lib | |
parent | 80a044edb663e6bc619b0755e30f9db10e37e9e8 (diff) | |
parent | 8d576b51a12fdb19e3993f3678ec64b2ea60fada (diff) | |
download | rails-e404490f9bae102f8c7126917d59568e6d1fef79.tar.gz rails-e404490f9bae102f8c7126917d59568e6d1fef79.tar.bz2 rails-e404490f9bae102f8c7126917d59568e6d1fef79.zip |
Merge branch 'master' of git://github.com/rails/rails
Diffstat (limited to 'activesupport/lib')
-rw-r--r-- | activesupport/lib/active_support/core_ext/date_time/conversions.rb | 6 | ||||
-rw-r--r-- | activesupport/lib/active_support/multibyte/chars.rb | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/activesupport/lib/active_support/core_ext/date_time/conversions.rb b/activesupport/lib/active_support/core_ext/date_time/conversions.rb index 24168c7825..c3f0acce25 100644 --- a/activesupport/lib/active_support/core_ext/date_time/conversions.rb +++ b/activesupport/lib/active_support/core_ext/date_time/conversions.rb @@ -60,7 +60,7 @@ class DateTime # Converts self to a Ruby Date object; time portion is discarded def to_date ::Date.new(year, month, day) - end unless method_defined?(:to_date) + end unless instance_methods(false).include?(:to_date) # Attempts to convert self to a Ruby Time object; returns self if out of range of Ruby Time class # If self has an offset other than 0, self will just be returned unaltered, since there's no clean way to map it to a Time @@ -71,7 +71,7 @@ class DateTime # To be able to keep Times, Dates and DateTimes interchangeable on conversions def to_datetime self - end unless method_defined?(:to_datetime) + end unless instance_methods(false).include?(:to_datetime) def self.civil_from_format(utc_or_local, year, month=1, day=1, hour=0, min=0, sec=0) offset = utc_or_local.to_sym == :local ? local_offset : 0 @@ -81,7 +81,7 @@ class DateTime # Converts datetime to an appropriate format for use in XML def xmlschema strftime("%Y-%m-%dT%H:%M:%S%Z") - end unless method_defined?(:xmlschema) + end unless instance_methods(false).include?(:xmlschema) # Converts self to a floating-point number of seconds since the Unix epoch def to_f diff --git a/activesupport/lib/active_support/multibyte/chars.rb b/activesupport/lib/active_support/multibyte/chars.rb index 429b65bf15..1eb6e8748b 100644 --- a/activesupport/lib/active_support/multibyte/chars.rb +++ b/activesupport/lib/active_support/multibyte/chars.rb @@ -45,6 +45,8 @@ module ActiveSupport #:nodoc: @wrapped_string = string @wrapped_string.force_encoding(Encoding::UTF_8) unless @wrapped_string.frozen? end + + undef <=> else def initialize(string) #:nodoc: @wrapped_string = string |