The old code seemed to have a bug here:

```ruby
irb(main):001:0> require 'msgpack'
=> true
irb(main):002:0> [1, 2, 3].to_msgpack
=> "\x93\x01\x02\x03"
irb(main):003:0> [1, 2, 3].to_msgpack(nil)
=> "\x93\x01\x02\x03"
irb(main):004:0> [1, 2, 3].to_msgpack('')
=> nil
```