diff options
author | wycats <wycats@gmail.com> | 2010-06-07 23:03:59 -0400 |
---|---|---|
committer | wycats <wycats@gmail.com> | 2010-06-07 23:03:59 -0400 |
commit | b97a3f33a36f936531e608343797b99268f8bd92 (patch) | |
tree | 94abb825948b826fefdfd8952c25a9f3f3690772 /activesupport/lib/active_support/core_ext/date_time/conversions.rb | |
parent | 0042f4166f783085eb909d69d542b5323d8af5d6 (diff) | |
parent | acef8feafa8a44271eb28685e180f8c28b7e4a0f (diff) | |
download | rails-b97a3f33a36f936531e608343797b99268f8bd92.tar.gz rails-b97a3f33a36f936531e608343797b99268f8bd92.tar.bz2 rails-b97a3f33a36f936531e608343797b99268f8bd92.zip |
Merge remote branch 'rsim/oracle_enhanced_rails3'
Diffstat (limited to 'activesupport/lib/active_support/core_ext/date_time/conversions.rb')
-rw-r--r-- | activesupport/lib/active_support/core_ext/date_time/conversions.rb | 6 |
1 files changed, 3 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 |