diff options
author | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2021-05-31 13:43:20 +0200 |
---|---|---|
committer | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2021-06-01 12:41:12 +0200 |
commit | 56e4713c5c0498838ed77a409e44fbc3251acde2 (patch) | |
tree | 5691223fa6d6bd4216f45a891656643d2cdb3d7f /data/rbot | |
parent | c79555eb5a0ddf99d53967e9f2631ff307338521 (diff) |
chucknorris: fix loading
There was an extra read.
Diffstat (limited to 'data/rbot')
-rw-r--r-- | data/rbot/plugins/chucknorris.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/data/rbot/plugins/chucknorris.rb b/data/rbot/plugins/chucknorris.rb index 177eccfb..42385ff3 100644 --- a/data/rbot/plugins/chucknorris.rb +++ b/data/rbot/plugins/chucknorris.rb @@ -19,7 +19,7 @@ class ChuckNorrisPlugin < Plugin debug "+ [chucknorris] Loading #{path}..." - @@facts = YAML.load(fyml.read).map{|fact,(score,votes)| votes >= MIN_VOTES ? [score,fact] : nil}.compact + @@facts = YAML.load(fyml).map{|fact,(score,votes)| votes >= MIN_VOTES ? [score,fact] : nil}.compact debug "+ [chucknorris] #{@@facts.length} Chuck Norris facts loaded..." debug " Random fact: #{@@facts[rand(@@facts.size)].inspect}" |