aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorSean Griffin <sean@seantheprogrammer.com>2016-01-08 17:42:31 -0700
committerSean Griffin <sean@seantheprogrammer.com>2016-01-08 17:43:37 -0700
commit30391e9ddba745d6bdc0b23f526ecf432dfe6adf (patch)
treeaa8b2be35f51f51340fab7f0e4e32f7937e6d0f6 /activerecord
parent7b065f623f2a56d74eca88ed27970c71a76f0a17 (diff)
downloadrails-30391e9ddba745d6bdc0b23f526ecf432dfe6adf.tar.gz
rails-30391e9ddba745d6bdc0b23f526ecf432dfe6adf.tar.bz2
rails-30391e9ddba745d6bdc0b23f526ecf432dfe6adf.zip
Fix the broken build
This is really strange, as it passes on Travis for 2.3, and it passes for me locally on 2.2. But on travis w/ 2.2, passing `Float::INFINITY` in is resulting in an infinite loop. This should resolve it.
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/lib/active_record/attribute_methods/time_zone_conversion.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/attribute_methods/time_zone_conversion.rb b/activerecord/lib/active_record/attribute_methods/time_zone_conversion.rb
index d9b9271fb0..061628725d 100644
--- a/activerecord/lib/active_record/attribute_methods/time_zone_conversion.rb
+++ b/activerecord/lib/active_record/attribute_methods/time_zone_conversion.rb
@@ -31,6 +31,8 @@ module ActiveRecord
if value.acts_like?(:time)
value.in_time_zone
+ elsif value.is_a?(::Float)
+ value
else
map(value) { |v| convert_time_to_time_zone(v) }
end