require 'unicorn'
hp = Unicorn::HttpParser.new
hp.add_parse("PUT / HTTP/1.1\r\nHost:example.com\r\n" \
             "Transfer-Encoding: chunked\r\n\r\n")
dst = ""
hp.filter_body(dst, "50\r\n" + ("a" * 41))
tmp = dst.dup # this line causes dst to be come shared

# this will raise: can't set length of shared string (RuntimeError)
# if dst is used as an IO#write arg
hp.filter_body(dst, ("*" * 39) << "\r\n")
