From b4342233a61b23035f61f0a796a7aa196744b99d Mon Sep 17 00:00:00 2001 From: franz Date: Sun, 28 Jun 2009 23:14:39 +0200 Subject: ruby 1.9: fix *methods.include? Since in 1.9 methods arrays have symbols instead of strings, fix it by changing into respond_to? and method_defined? --- lib/rbot/ircbot.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/rbot/ircbot.rb') diff --git a/lib/rbot/ircbot.rb b/lib/rbot/ircbot.rb index 9317fd4d..2f146c29 100644 --- a/lib/rbot/ircbot.rb +++ b/lib/rbot/ircbot.rb @@ -23,7 +23,7 @@ $log_thread = nil require 'pp' -unless Kernel.instance_methods.include?("pretty_inspect") +unless Kernel.respond_to? :pretty_inspect def pretty_inspect PP.pp(self, '') end -- cgit v1.2.3