diff options
| author | frsyuki <frsyuki@users.sourceforge.jp> | 2010-08-31 07:00:19 +0900 |
|---|---|---|
| committer | frsyuki <frsyuki@users.sourceforge.jp> | 2010-08-31 07:00:19 +0900 |
| commit | 09b47cc536ebd951c231fd5e09b4382a25b98020 (patch) | |
| tree | 68e3fc9d921834b429469306ac4b8947410b6b8b /ruby/test/test_pack_unpack.rb | |
| parent | b5c78de2ddf82783a6f80a199b68927d1a1747ca (diff) | |
| download | msgpack-python-09b47cc536ebd951c231fd5e09b4382a25b98020.tar.gz | |
ruby: fixes compatibility with ruby-1.8.5
Diffstat (limited to 'ruby/test/test_pack_unpack.rb')
| -rw-r--r-- | ruby/test/test_pack_unpack.rb | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/ruby/test/test_pack_unpack.rb b/ruby/test/test_pack_unpack.rb index 25bde81..545e593 100644 --- a/ruby/test/test_pack_unpack.rb +++ b/ruby/test/test_pack_unpack.rb @@ -153,7 +153,8 @@ class MessagePackTestPackUnpack < Test::Unit::TestCase end it "{1=>1}" do - match ({1=>1}), "\x81\x01\x01" + obj = {1=>1} + match obj, "\x81\x01\x01" end it "1.0" do @@ -165,15 +166,18 @@ class MessagePackTestPackUnpack < Test::Unit::TestCase end it "[0, 1, ..., 14]" do - match (0..14).to_a, "\x9f\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e" + obj = (0..14).to_a + match obj, "\x9f\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e" end it "[0, 1, ..., 15]" do - match (0..15).to_a, "\xdc\x00\x10\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f" + obj = (0..15).to_a + match obj, "\xdc\x00\x10\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f" end it "{}" do - match ({}), "\x80" + obj = {} + match obj, "\x80" end ## FIXME |
