]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/commitdiff
ruby 1.9: disable the Singleton monkeypatch for 1.9
authorfranz <Franz.Netykafka@runbox.com>
Mon, 15 Jun 2009 20:07:45 +0000 (22:07 +0200)
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Wed, 26 Aug 2009 21:31:38 +0000 (23:31 +0200)
this monkeypatch doesn't work on 1.9 - Singleton has no _load method

lib/rbot/irc.rb

index 9a9998e7f391ce6c12a48b2c892d03063bc61c6f..7970a773e5fd534b1dc9c141b5347ad1d6687ebd 100644 (file)
@@ -24,6 +24,7 @@ require 'singleton'
 # The following monkeypatch is to fix a bug in Singleton where marshaling would
 # fail when trying to restore a marshaled Singleton due to _load being declared
 # private.
+if RUBY_VERSION < '1.9'
 module ::Singleton
   public :_dump
 end
@@ -33,6 +34,7 @@ class << Singleton
     public :_load
   end
 end
+end
 
 class Object