rails--rails/activesupport/test/core_ext
Edouard CHIN c85e3f65f3 Fix issue where duration where always rounded up to a second:
- Adding a Float as a duration to a datetime would result in the Float
  being rounded. Doing something like would have no effect because the
  0.45 seconds would be rounded to 0 second.

  ```ruby
    time = DateTime.parse("2018-1-1")
    time += 0.45.seconds
  ```

  This behavior was intentionally added a very long time ago, the
  reason was because Ruby 1.8 was using `Integer#gcd` in the
  constructor of Rational which didn't accept a float value.

  That's no longer the case and doing `Rational(0.45, 86400)` would
  now perfectly work fine.

- Fixes #34008
2018-10-12 13:27:13 -04:00
..
array Change the empty block style to have space inside of the block 2018-09-25 13:19:35 -04:00
class [Active Support] `rubocop -a --only Layout/EmptyLineAfterMagicComment` 2017-07-11 13:12:32 +09:00
digest [Active Support] `rubocop -a --only Layout/EmptyLineAfterMagicComment` 2017-07-11 13:12:32 +09:00
hash Rails 6 requires Ruby 2.4.1+ 2018-02-17 15:34:57 -08:00
kernel [Active Support] `rubocop -a --only Layout/EmptyLineAfterMagicComment` 2017-07-11 13:12:32 +09:00
module Prefix Module#parent, Module#parents, and Module#parent_name with module 2018-10-02 12:51:35 -04:00
object Add `Style/RedundantFreeze` to remove redudant `.freeze` 2018-09-29 07:18:44 +00:00
bigdecimal_test.rb Suppress `warning: BigDecimal.new is deprecated` 2017-12-15 01:19:57 +00:00
class_test.rb Change refute to assert_not 2018-01-25 23:32:58 -05:00
date_and_time_behavior.rb Move implementation of `before?` and `after?` to `DateAndTime::Calculations` 2018-03-31 18:20:46 +03:00
date_and_time_compatibility_test.rb Add `Style/RedundantFreeze` to remove redudant `.freeze` 2018-09-29 07:18:44 +00:00
date_ext_test.rb Move implementation of `before?` and `after?` to `DateAndTime::Calculations` 2018-03-31 18:20:46 +03:00
date_time_ext_test.rb Fix issue where duration where always rounded up to a second: 2018-10-12 13:27:13 -04:00
duration_test.rb Add tests for duration multiplication and division 2018-06-25 13:48:35 +01:00
enumerable_test.rb Add Enumerable#index_with. 2018-05-21 17:44:54 +02:00
file_test.rb Replace `assert !` with `assert_not` 2018-04-19 08:11:33 -04:00
hash_ext_test.rb Deprecate `active_support/core_ext/hash/compact` 2018-03-02 16:40:55 -08:00
integer_ext_test.rb Replace `assert !` with `assert_not` 2018-04-19 08:11:33 -04:00
kernel_test.rb [Active Support] `rubocop -a --only Layout/EmptyLineAfterMagicComment` 2017-07-11 13:12:32 +09:00
load_error_test.rb Fix #29632 - nil #path leads to NoMethodError in LoadError#is_missing? 2018-05-04 10:47:18 -04:00
marshal_test.rb [Active Support] `rubocop -a --only Layout/EmptyLineAfterMagicComment` 2017-07-11 13:12:32 +09:00
module_test.rb Add separate test to ensure that `delegate` with `:private` option returns correct value 2018-02-28 10:29:12 +02:00
name_error_test.rb Replace `assert !` with `assert_not` 2018-04-19 08:11:33 -04:00
numeric_ext_test.rb Deprecate "active_support/core_ext/numeric/inquiry" 2018-03-02 23:32:10 -08:00
range_ext_test.rb Change the empty block style to have space inside of the block 2018-09-25 13:19:35 -04:00
regexp_ext_test.rb Remove `test_match_p` since Rails 6 requires Ruby 2.4.1 or newer 2018-05-07 04:19:24 +09:00
secure_random_test.rb [Active Support] `rubocop -a --only Layout/EmptyLineAfterMagicComment` 2017-07-11 13:12:32 +09:00
string_ext_test.rb Merge pull request #33058 from gmcgibbon/string_first_last_negative_deprecation 2018-10-02 11:05:40 -04:00
time_ext_test.rb Fix spellings for 'unmarshall(ing/ed)' & 'marshall(ing/ed)' 2018-10-02 13:55:39 +05:30
time_with_zone_test.rb Change the empty block style to have space inside of the block 2018-09-25 13:19:35 -04:00
uri_ext_test.rb URI.unescape handles mixed Unicode/escaped input 2018-03-07 12:58:02 +11:00