summaryrefslogtreecommitdiff
path: root/data/rbot
diff options
context:
space:
mode:
authorfranz <Franz.Netykafka@runbox.com>2009-06-15 20:41:01 +0200
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2009-08-26 23:31:36 +0200
commit40c32ccb24cdaac307d4cf12646c3e869817a153 (patch)
treed761dee5f24b756a3c7383d4004c42097c5ffa22 /data/rbot
parentdb1fae02053ec1a891e37498e1a5c0fd28043823 (diff)
ruby 1.9: get rid of Array#nitems
Array#nitems is gone in ruby 1.9, changed rbot code to use Array.compact.size, which works in both 1.8 & 1.9
Diffstat (limited to 'data/rbot')
-rw-r--r--data/rbot/plugins/quotes.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/data/rbot/plugins/quotes.rb b/data/rbot/plugins/quotes.rb
index bb5ae57e..c1066689 100644
--- a/data/rbot/plugins/quotes.rb
+++ b/data/rbot/plugins/quotes.rb
@@ -80,7 +80,7 @@ class QuotePlugin < Plugin
end
else
# random quote
- return @lists[channel].compact[rand(@lists[channel].nitems)],
+ return @lists[channel].compact.pick_one,
@lists[channel].length - 1
end
end