Skip to content

String#concat should preserve encoding #756

@carllerche

Description

@carllerche
irb(main):008:0> bin = "\0\1".force_encoding('BINARY')
=> "\x00\x01"
irb(main):009:0> bin << "ZOMG"
=> "\u0000\u0001ZOMG"
irb(main):010:0> bin.encoding
=> #<Encoding:UTF-8>
irb(main):011:0> JRUBY_VERSION
=> "1.7.3"

bin.encoding should not be UTF-8 after this.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions