X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;ds=sidebyside;f=lib%2Frbot%2Fconfig.rb;h=5af50f346b3eb849d5a09546318f009712c9bf01;hb=858d9d66ad68629fd8c49ef339088387c4afbb5f;hp=957c63a3fd68966bef5f40d5667e52d3a475f602;hpb=83fd5d3b11539a07b740048ad93c09e31e8d6701;p=user%2Fhenk%2Fcode%2Fruby%2Frbot.git 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