From 56e4713c5c0498838ed77a409e44fbc3251acde2 Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Mon, 31 May 2021 13:43:20 +0200 Subject: chucknorris: fix loading There was an extra read. --- data/rbot/plugins/chucknorris.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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}" -- cgit v1.2.3