summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2008-12-16 01:18:17 +0100
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2008-12-16 01:18:17 +0100
commitba42283d7cfe895a6604ce64f6e3399eb54fa2d3 (patch)
treec3516fef28607f78c251949783f6ebc263efc01a
parent1579c60ee8ad2cb24eadbec66bfe3710775b2a05 (diff)
utils.rb: fix Utils.distance_of_time_in_words for negative offsets
-rw-r--r--lib/rbot/core/utils/utils.rb2
1 files changed, 2 insertions, 0 deletions
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