Project

General

Profile

Actions

Bug #8018

closed

Typo in Class: Encoding documentation. Encoding::UTF-8 instead of Encoding::UTF_8

Added by eljojo (Jose Tomas Albornoz) about 11 years ago. Updated about 11 years ago.

Status:
Closed
Assignee:
Target version:
-
ruby -v:
2.0
Backport:
[ruby-core:53139]

Description

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

Updated by marcandre (Marc-Andre Lafortune) about 11 years ago

  • Status changed from Open to Closed

Already fixed by r39575, see https://github.com/ruby/ruby/pull/255

Actions

Also available in: Atom PDF

Like0
Like0