diff --git a/activesupport/lib/active_support/core_ext/time/calculations.rb b/activesupport/lib/active_support/core_ext/time/calculations.rb index 153168950b3..9c9f26047fa 100644 --- a/activesupport/lib/active_support/core_ext/time/calculations.rb +++ b/activesupport/lib/active_support/core_ext/time/calculations.rb @@ -116,7 +116,7 @@ class Time # Restricted Ruby version due to a bug in `Time#ceil` # See https://bugs.ruby-lang.org/issues/17025 for more details - if RUBY_VERSION <= "2.7.1" + if RUBY_VERSION <= "2.8" remove_possible_method :ceil def ceil(precision = 0) change(nsec: 0) + subsec.ceil(precision)