You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Replacements:
5.ago => 5.seconds.ago
5.until => 5.seconds.until
5.since => 5.seconds.since
5.from_now => 5.seconds.from_now
The removed tests does not affect coverage – we have equivalent test cases in
the tests for `AS::Duration`.
See #12389 for the history and rationale behind this.
Copy file name to clipboardexpand all lines: activesupport/lib/active_support/core_ext/numeric/time.rb
+1-19
Original file line number
Diff line number
Diff line change
@@ -61,25 +61,7 @@ def fortnights
61
61
end
62
62
alias:fortnight:fortnights
63
63
64
-
# Reads best without arguments: 10.minutes.ago
65
-
defago(time= ::Time.current)
66
-
ActiveSupport::Deprecation.warn"Calling #ago or #until on a number (e.g. 5.ago) is deprecated and will be removed in the future, use 5.seconds.ago instead"
67
-
time - self
68
-
end
69
-
70
-
# Reads best with argument: 10.minutes.until(time)
71
-
alias:until:ago
72
-
73
-
# Reads best with argument: 10.minutes.since(time)
74
-
defsince(time= ::Time.current)
75
-
ActiveSupport::Deprecation.warn"Calling #since or #from_now on a number (e.g. 5.since) is deprecated and will be removed in the future, use 5.seconds.since instead"
76
-
time + self
77
-
end
78
-
79
-
# Reads best without arguments: 10.minutes.from_now
80
-
alias:from_now:since
81
-
82
-
# Used with the standard time durations, like 1.hour.in_milliseconds --
64
+
# Used with the standard time durations, like 1.hour.in_milliseconds --
83
65
# so we can feed them to JavaScript functions like getTime().
0 commit comments