From: Johan Sørensen <johan@johansorensen.com>
Subject: Further Ruby 1.9 support: IO#getc returns a string, instead of a char in 1.9
Origin: upstream, http://github.com/js/stomp/commit/2971a7922f64052c5b308f2a4a92080d7c8b046b
--- a/lib/stomp.rb
+++ b/lib/stomp.rb
@@ -194,12 +194,18 @@ module Stomp
           
           if (m.headers['content-length'])
             m.body = s.read m.headers['content-length'].to_i
-            c = s.getc
+            c = RUBY_VERSION > '1.9' ? s.getc.ord : s.getc
             raise "Invalid content length received" unless c == 0
           else
             m.body = ''
-            until (c = s.getc) == 0
-              m.body << c.chr
+            if RUBY_VERSION > '1.9'
+              until (c = s.getc.ord) == 0
+                m.body << c.chr
+              end
+            else
+              until (c = s.getc) == 0
+                m.body << c.chr
+              end
             end
           end
           #c = s.getc
