public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] gentoo-x86 commit in dev-ruby/stompserver/files: stompserver-0.9.9-ruby19.patch
@ 2013-08-22  0:13 Manuel Rueger (mrueg)
  0 siblings, 0 replies; only message in thread
From: Manuel Rueger (mrueg) @ 2013-08-22  0:13 UTC (permalink / raw
  To: gentoo-commits

mrueg       13/08/22 00:13:44

  Added:                stompserver-0.9.9-ruby19.patch
  Log:
  Fix bug #425938. Add patch for ruby19 support.
  
  (Portage version: 2.2.0/cvs/Linux x86_64, signed Manifest commit with key )

Revision  Changes    Path
1.1                  dev-ruby/stompserver/files/stompserver-0.9.9-ruby19.patch

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-ruby/stompserver/files/stompserver-0.9.9-ruby19.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-ruby/stompserver/files/stompserver-0.9.9-ruby19.patch?rev=1.1&content-type=text/plain

Index: stompserver-0.9.9-ruby19.patch
===================================================================
From b2dd714f9bc6d7b831767cc0d45d7f00cae2bde5 Mon Sep 17 00:00:00 2001
From: Timothy Redaelli <timothy@redaelli.eu>
Date: Tue, 22 Mar 2011 13:46:35 +0100
Subject: [PATCH] Adapt for ruby 1.9

---
 lib/stomp_server/stomp_frame.rb | 6 +++---
 test/test_topic_manager.rb      | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/lib/stomp_server/stomp_frame.rb b/lib/stomp_server/stomp_frame.rb
index 3833d98..b2cb950 100644
--- a/lib/stomp_server/stomp_frame.rb
+++ b/lib/stomp_server/stomp_frame.rb
@@ -10,7 +10,7 @@ def initialize(command=nil, headers=nil, body=nil)
  
   def to_s
     result = @command + "\n"
-    @headers['content-length'] = @body.size.to_s if @body.include?(0)
+    @headers['content-length'] = @body.size.to_s if @body.include?(0.chr)
     @headers.each_pair do |key, value|
       result << "#{key}:#{value}\n"
     end
@@ -37,7 +37,7 @@ def initialize
   end
   
   def parse_body(len)
-    raise RuntimeError.new("Invalid stompframe (missing null term)") unless @buffer[len] == 0
+    raise RuntimeError.new("Invalid stompframe (missing null term)") unless @buffer[len] == 0.chr
     @frame.body = @buffer[0...len]
     @buffer = @buffer[len+1..-1]
     @frames << @frame
@@ -51,7 +51,7 @@ def parse_binary_body
   end
   
   def parse_text_body
-    if pos = @buffer.index(0)
+    if pos = @buffer.index(0.chr)
       parse_body(pos)
     end
   end
diff --git a/test/test_topic_manager.rb b/test/test_topic_manager.rb
index 152a577..1e23b6b 100644
--- a/test/test_topic_manager.rb
+++ b/test/test_topic_manager.rb
@@ -52,7 +52,7 @@ def test_unsubscribe
     assert_equal('', u.data)        
   end
 
-  def test_sendmsg(msg)
+  def test_sendmsg
     u = UserMock.new
     t = 'foo'
     @t.subscribe(t, u)
-- 
1.8.1.6






^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2013-08-22  0:13 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-22  0:13 [gentoo-commits] gentoo-x86 commit in dev-ruby/stompserver/files: stompserver-0.9.9-ruby19.patch Manuel Rueger (mrueg)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox