Issue #6156 has been reported by John Firebaugh.

----------------------------------------
Bug #6156: String#tr fails on UTF-16
https://bugs.ruby-lang.org/issues/6156

Author: John Firebaugh
Status: Open
Priority: Normal
Assignee: 
Category: 
Target version: 
ruby -v: ruby 1.9.3p125 (2012-02-16 revision 34643) [x86_64-darwin11.3.0]


>> "b".encode("utf-16le").tr("a-z".encode("utf-16le"), "*".encode("utf-16le"))
ArgumentError: invalid byte sequence in UTF-16LE
	from (irb):91:in `tr'
	from (irb):91
	from /Users/john/.rvm/rubies/ruby-1.9.3-p125/bin/irb:16:in `<main>'

Expected result is UTF-16LE "*".


-- 
http://bugs.ruby-lang.org/