Sha256: c217283580f30af91d6104398fbc4a202e2557691363f36007902456568527f7
Contents?: true
Size: 567 Bytes
Versions: 2
Compression:
Stored size: 567 Bytes
Contents
if RUBY_VERSION < '1.9' module TimeCrisis class Time 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 = frozen? ? dup : self obj.instance_variable_set('@marshal_with_utc_coercion', utc?) obj._original_dump(*args) end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
time_crisis-0.3.1 | lib/time_crisis/support/ext/time/marshal_with_utc_flag.rb |
time_crisis-0.3.0 | lib/time_crisis/support/ext/time/marshal_with_utc_flag.rb |