X-Git-Url: https://git.njae.me.uk/?a=blobdiff_plain;f=vendor%2Frails%2Factivesupport%2Flib%2Factive_support%2Fcore_ext%2Ftime.rb;fp=vendor%2Frails%2Factivesupport%2Flib%2Factive_support%2Fcore_ext%2Ftime.rb;h=0000000000000000000000000000000000000000;hb=36d9f3351a3b4e8159279445190e2287ffdea86c;hp=78bbfc917c3d34a2aa204021493a1184ce07ca6e;hpb=913cf6054b1d29b5d2f5e620304af7ee77cc1f1f;p=feedcatcher.git diff --git a/vendor/rails/activesupport/lib/active_support/core_ext/time.rb b/vendor/rails/activesupport/lib/active_support/core_ext/time.rb deleted file mode 100644 index 78bbfc9..0000000 --- a/vendor/rails/activesupport/lib/active_support/core_ext/time.rb +++ /dev/null @@ -1,42 +0,0 @@ -require 'date' -require 'time' - -class Time - # Ruby 1.8-cvs and 1.9 define private Time#to_date - %w(to_date to_datetime).each do |method| - public method if private_instance_methods.include?(method) - end - - # Pre-1.9 versions of Ruby have a bug with marshaling Time instances, where utc instances are - # unmarshaled in the local zone, instead of utc. We're layering behavior on the _dump and _load - # methods so that utc instances can be flagged on dump, and coerced back to utc on load. - if RUBY_VERSION < '1.9' - class << self - alias_method :_original_load, :_load - def _load(marshaled_time) - time = _original_load(marshaled_time) - utc = time.instance_variable_get('@marshal_with_utc_coercion') - utc ? time.utc : time - end - end - - alias_method :_original_dump, :_dump - def _dump(*args) - obj = self.frozen? ? self.dup : self - obj.instance_variable_set('@marshal_with_utc_coercion', utc?) - obj._original_dump(*args) - end - end -end - -require 'active_support/core_ext/time/behavior' -require 'active_support/core_ext/time/calculations' -require 'active_support/core_ext/time/conversions' -require 'active_support/core_ext/time/zones' - -class Time#:nodoc: - include ActiveSupport::CoreExtensions::Time::Behavior - include ActiveSupport::CoreExtensions::Time::Calculations - include ActiveSupport::CoreExtensions::Time::Conversions - include ActiveSupport::CoreExtensions::Time::Zones -end