Skip to content
This repository
Browse code

Ruby 1.9 compatibility fix

  • Loading branch information...
commit 92e2cd0002ec3a9a38506527e1a3a2d622408626 1 parent 37d466f

Showing 1 changed file with 2 additions and 2 deletions. Show diff stats Hide diff stats

  1. 4  lib/xmpp4r-simple.rb
4  lib/xmpp4r-simple.rb
@@ -438,8 +438,8 @@ def register_default_callbacks
438 438
       roster.add_presence_callback do |roster_item, old_presence, new_presence|
439 439
         simple_jid = roster_item.jid.strip.to_s
440 440
         presence = case new_presence.type
-                   when nil: || :online
-                   when :unavailable: :unavailable
+                   when nil then || :online
+                   when :unavailable then :unavailable
443 443
444 444
445 445

4 notes on commit 92e2cd0

Ryan Taylor Long

Am I missing something, or was this never rolled out to a new gem version? I just installed 0.8.8 and got the error related to this fix. If I'm correct, and it hasn't been rolled out, would you mind doing so? Thanks!

David Rice

@rtlong I'm not sure if a newer version has been pushed out since. If you're using bundler, you could require the gem directly from this repo.

Ryan Taylor Long

Thanks, I am aware of the ability to do that. It's a moot point now, anyway, as I have found an alternative that is under active development and works great with Ruby 1.9: blather

Ryan Taylor Long

For the record @davidjrice, I was asking the maintainer to push a new gem version. I expect you just wrote this patch... that's why I included the Blather plug, for your benefit.

Please sign in to comment.
Something went wrong with that request. Please try again.