Skip to content

Commit

Permalink
updated to_msgpack() implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
frsyuki committed May 14, 2012
1 parent d4a2c32 commit eb4fcaa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions test/perf_simple.rb
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions test/perf_strict.rb
Expand Up @@ -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)
Expand Down

0 comments on commit eb4fcaa

Please sign in to comment.