Permalink
Browse files

Actually check the value of the ivar

  • Loading branch information...
1 parent 4384a95 commit 4b9f1672313b120bdc3dfcceb375f3d72d43d103 @wycats wycats committed Mar 27, 2010
Showing with 2 additions and 4 deletions.
  1. +2 −4 activesupport/lib/active_support/core_ext/time/marshal_with_utc_flag.rb
View
6 activesupport/lib/active_support/core_ext/time/marshal_with_utc_flag.rb
@@ -9,11 +9,9 @@ def _load(marshaled_time)
time = _original_load(marshaled_time)
time.instance_eval do
if defined?(@marshal_with_utc_coercion)
- remove_instance_variable("@marshal_with_utc_coercion")
- utc
- else
- self
+ val = remove_instance_variable("@marshal_with_utc_coercion")
end
+ val ? utc : self
end
end
end

3 comments on commit 4b9f167

@KieranP
1) Failure:
test_marshaling_with_frozen_local_instance(TimeExtMarshalingTest)
    [./test/core_ext/time_ext_test.rb:788:in `test_marshaling_with_frozen_local_instance'
     /opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/gems/1.8/gems/mocha-0.9.8/lib/mocha/integration/test_unit/ruby_version_186_and_above.rb:19:in `__send__'
     /opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/gems/1.8/gems/mocha-0.9.8/lib/mocha/integration/test_unit/ruby_version_186_and_above.rb:19:in `run']:
<"UTC"> expected but was
<"NZDT">.
@wycats
Ruby on Rails member

@KieranP This should be fixed by a later commit

@KieranP

I'm using the latest Rails master, and that's the error I get.

Please sign in to comment.