Permalink
Browse files

updated to_msgpack() implementation

  • Loading branch information...
1 parent d4a2c32 commit eb4fcaa13c4cd919996b3c2d692f913f664ca8e3 @frsyuki frsyuki 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
@@ -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
@@ -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 eb4fcaa

Please sign in to comment.