]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/commitdiff
ruby 1.9: convert Exception to string explicitly
authorfranz <Franz.Netykafka@runbox.com>
Mon, 15 Jun 2009 19:07:35 +0000 (21:07 +0200)
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Wed, 26 Aug 2009 21:31:37 +0000 (23:31 +0200)
changed "string + exception" to "string #{e}", the
former yields 'can't convert <e> into String' in ruby 1.9

lib/rbot/ircbot.rb

index f04cb4803ff06d65335a1cfe60b5d85c7157f66a..9317fd4d16a131241c01ef527379675fef1aca0a 100644 (file)
@@ -914,7 +914,7 @@ class Bot
       @socket.connect
       @last_rec = Time.now
     rescue => e
-      raise e.class, "failed to connect to IRC server at #{@socket.server_uri}: " + e
+      raise e.class, "failed to connect to IRC server at #{@socket.server_uri}: #{e}"
     end
     quit if $interrupted > 0