aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/core_ext
diff options
context:
space:
mode:
authorAndrew White <andyw@pixeltrix.co.uk>2014-01-12 00:24:50 -0800
committerAndrew White <andyw@pixeltrix.co.uk>2014-01-12 00:24:50 -0800
commit75c271198ac2c94c58b46389383aef2df1afc572 (patch)
tree7928faf768f02b32f657753688e5d2fb1b1fe791 /activesupport/test/core_ext
parent4ae3da66f71fac4fb5cd5796e7460dc4e982891b (diff)
parent1842a6920f6205262407ca893d31577f050b6b87 (diff)
downloadrails-75c271198ac2c94c58b46389383aef2df1afc572.tar.gz
rails-75c271198ac2c94c58b46389383aef2df1afc572.tar.bz2
rails-75c271198ac2c94c58b46389383aef2df1afc572.zip
Merge pull request #13668 from prathamesh-sonpatki/issue-13667
Fix iterating over DateTime by doing strict checking for Time objects
Diffstat (limited to 'activesupport/test/core_ext')
-rw-r--r--activesupport/test/core_ext/range_ext_test.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/activesupport/test/core_ext/range_ext_test.rb b/activesupport/test/core_ext/range_ext_test.rb
index 6d6afc85c4..150e6b65fb 100644
--- a/activesupport/test/core_ext/range_ext_test.rb
+++ b/activesupport/test/core_ext/range_ext_test.rb
@@ -112,4 +112,8 @@ class RangeTest < ActiveSupport::TestCase
end
end
+ def test_date_time_with_each
+ datetime = DateTime.now
+ assert ((datetime - 1.hour)..datetime).each {}
+ end
end