Forum: Ruby-core [ruby-trunk - Bug #8018][Open] Typo in Class: Encoding documentation. Encoding::UTF-8 instead of Enc

Posted by eljojo (Jose Tomas Albornoz) (Guest)
on 2013-03-05 09:13
(Received via mailing list)
Issue #8018 has been reported by eljojo (Jose Tomas Albornoz).

----------------------------------------
Bug #8018: Typo in Class: Encoding documentation. Encoding::UTF-8 
instead of Encoding::UTF_8
https://bugs.ruby-lang.org/issues/8018

Author: eljojo (Jose Tomas Albornoz)
Status: Open
Priority: Low
Assignee: zzak (Zachary Scott)
Category: doc
Target version:
ruby -v: 2.0


Hi, there's a typo in the Encoding Class documentation. 
http://ruby-doc.org/core-2.0/Encoding.html

In the Changing an encoding section, in the example says

string.force_encoding(Encoding::UTF-8)

instead of
string.force_encoding(Encoding::UTF_8)

The current example causes an NameError: uninitialized constant 
Encoding::UTF error
Posted by marcandre (Marc-Andre Lafortune) (Guest)
on 2013-03-05 18:48
(Received via mailing list)
Issue #8018 has been updated by marcandre (Marc-Andre Lafortune).

Status changed from Open to Closed

Already fixed by r39575, see https://github.com/ruby/ruby/pull/255
----------------------------------------
Bug #8018: Typo in Class: Encoding documentation. Encoding::UTF-8 
instead of Encoding::UTF_8
https://bugs.ruby-lang.org/issues/8018#change-37313

Author: eljojo (Jose Tomas Albornoz)
Status: Closed
Priority: Low
Assignee: zzak (Zachary Scott)
Category: doc
Target version:
ruby -v: 2.0


Hi, there's a typo in the Encoding Class documentation. 
http://ruby-doc.org/core-2.0/Encoding.html

In the Changing an encoding section, in the example says

string.force_encoding(Encoding::UTF-8)

instead of
string.force_encoding(Encoding::UTF_8)

The current example causes an NameError: uninitialized constant 
Encoding::UTF error
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.