Bug #562

String#encode Behaving Like String#encode!

Added by James Gray over 6 years ago. Updated about 4 years ago.

[ruby-core:18578]
Status:Closed
Priority:Normal
Assignee:-
ruby -v: Backport:

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

History

#1 Updated by Nobuyoshi Nakada over 6 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

=begin
Applied in changeset r19349.
=end

Also available in: Atom PDF