From ba42283d7cfe895a6604ce64f6e3399eb54fa2d3 Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Tue, 16 Dec 2008 01:18:17 +0100 Subject: utils.rb: fix Utils.distance_of_time_in_words for negative offsets --- lib/rbot/core/utils/utils.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/rbot') diff --git a/lib/rbot/core/utils/utils.rb b/lib/rbot/core/utils/utils.rb index 084f92a5..864426b0 100644 --- a/lib/rbot/core/utils/utils.rb +++ b/lib/rbot/core/utils/utils.rb @@ -262,6 +262,8 @@ module ::Irc # 70 => about one hour def Utils.distance_of_time_in_words(minutes) case + when minutes < 0 + Utils.distance_of_time_in_words(-minutes) when minutes < 1 _("less than a minute") when minutes < 50 -- cgit v1.2.3