diff options
author | Tom Gilbert <tom@linuxbrit.co.uk> | 2005-08-07 16:27:13 +0000 |
---|---|---|
committer | Tom Gilbert <tom@linuxbrit.co.uk> | 2005-08-07 16:27:13 +0000 |
commit | 858d9d66ad68629fd8c49ef339088387c4afbb5f (patch) | |
tree | b1edd4ccf2c864859f34b7e3951eb14a621f5fc5 /lib/rbot | |
parent | ed78f06271350b42b36b4bcd5ede7395529823f6 (diff) |
attempt workaround for missing load_file
Diffstat (limited to 'lib/rbot')
-rw-r--r-- | lib/rbot/config.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/rbot/config.rb b/lib/rbot/config.rb index 957c63a3..5af50f34 100644 --- a/lib/rbot/config.rb +++ b/lib/rbot/config.rb @@ -3,6 +3,16 @@ module Irc require 'yaml' require 'rbot/messagemapper' + unless YAML.respond_to?(:load_file) + module YAML + def YAML.load_file( filepath ) + File.open( filepath ) do |f| + YAML::load( f ) + end + end + end + end + class BotConfigValue # allow the definition order to be preserved so that sorting by # definition order is possible. The BotConfigWizard does this to allow |