Permalink
Browse files

Merge pull request #19 from frsyuki/master

updated to_msgpack() implementation
  • Loading branch information...
2 parents d4a2c32 + eb4fcaa commit 52899a4e97de46e272d2e097f963152bdf6dfa7a @ohler55 committed May 14, 2012
Showing with 4 additions and 4 deletions.
  1. +2 −2 test/perf_simple.rb
  2. +2 −2 test/perf_strict.rb
View
4 test/perf_simple.rb
@@ -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
View
4 test/perf_strict.rb
@@ -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)

0 comments on commit 52899a4

Please sign in to comment.