summaryrefslogtreecommitdiff
path: root/data/rbot
diff options
context:
space:
mode:
authorRaine Virta <rane@kapsi.fi>2009-10-22 14:35:57 +0300
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2009-11-01 12:53:44 +0100
commit97ff6011d46be37ef8b1b3ebd7c7bfb8ad06b613 (patch)
tree7157fad0720000b70269e429754235aba1e0e790 /data/rbot
parent9b5c91ee577dae29caf13d180566a114fba5c263 (diff)
urban: fix numpages being nil in some cases
Diffstat (limited to 'data/rbot')
-rw-r--r--data/rbot/plugins/urban.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/data/rbot/plugins/urban.rb b/data/rbot/plugins/urban.rb
index 68ffadba..cdef78ee 100644
--- a/data/rbot/plugins/urban.rb
+++ b/data/rbot/plugins/urban.rb
@@ -22,7 +22,7 @@ class UrbanPlugin < Plugin
notfound = s.match %r{<i>.*?</i> isn't defined}
numpages = if s[%r{<div id='paginator'>.*?</div>}m]
- $&.scan(/\d+/).collect {|x| x.to_i}.max
+ $&.scan(/\d+/).collect {|x| x.to_i}.max || 1
else 1 end
rv = Array.new