Skip to content

Commit

Permalink
FIX: Updated encoding for Ruby versions lower than 2.x
Browse files Browse the repository at this point in the history
  • Loading branch information
rudionrails committed Nov 28, 2013
1 parent 4b23eb7 commit 38e7c6e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion spec/yell/adapters/gelf_spec.rb
Expand Up @@ -88,7 +88,13 @@ def send( *datagrams )
end

it "should be zipped" do
datagrams[0][0..1].bytes.should == [0x78, 0x9C] # zlib header
expected = "\x78\x9c" # zlib header

if RUBY_VERSION[0, 1].to_i >= 2
expected = expected.b
end

datagrams[0][0..1].should == expected
end
end

Expand Down

0 comments on commit 38e7c6e

Please sign in to comment.