Actions
Bug #562
closedString#encode Behaving Like String#encode!
Description
=begin
String#encode is changing the original String in the version of Ruby I built yesterday:
$ cat bug.rb
#!/usr/bin/env ruby -w
encoding: UTF-8¶
a = "James"
b = a.encode("SJIS")
p a.encoding
p b.encoding
$ ruby_dev bug.rb
#Encoding:Shift_JIS
#Encoding:Shift_JIS
James Edward Gray II
=end
Updated by nobu (Nobuyoshi Nakada) over 16 years ago
- Status changed from Open to Closed
- % Done changed from 0 to 100
=begin
Applied in changeset r19349.
=end
Actions
Like0
Like0