Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #19 from frsyuki/master

updated to_msgpack() implementation
  • Loading branch information...
commit 52899a4e97de46e272d2e097f963152bdf6dfa7a 2 parents d4a2c32 + eb4fcaa
Peter Ohler authored
Showing with 4 additions and 4 deletions.
  1. +2 −2 test/perf_simple.rb
  2. +2 −2 test/perf_strict.rb
4 test/perf_simple.rb
View
@@ -39,8 +39,8 @@ def to_hash()
'hash' => @hash,
}
end
- def to_msgpack(out)
- out << MessagePack.pack(to_hash())
+ def to_msgpack(out='')
+ to_hash().to_msgpack(out)
end
end
4 test/perf_strict.rb
View
@@ -50,8 +50,8 @@ def to_hash()
end
alias as_json to_hash
- def to_msgpack(out)
- out << MessagePack.pack(to_hash())
+ def to_msgpack(out='')
+ to_hash().to_msgpack(out)
end
def self.json_create(h)
Please sign in to comment.
Something went wrong with that request. Please try again.