Project

General

Profile

Actions

Bug #6488

closed

String#slice example has a syntax error

Added by amorsen (Benny Lyne Amorsen) almost 12 years ago. Updated almost 12 years ago.

Status:
Closed
Target version:
ruby -v:
ruby 1.9.3p0 (2011-10-30) [x86_64-linux]
Backport:
[ruby-core:45207]

Description

http://www.ruby-doc.org/core-1.9.3/String.html#method-i-slice has a syntax error:

a[%raeiou\11//] #=> "ell"
a[%raeiou\11//, 0] #=> "ell"
a[%raeiou\11//, 1] #=> "l"
a[%raeiou\11//, 2] #=> nil

Oh, I have just realized that similar problems exist in the other regexp examples on the page, not just for slice.


Related issues 1 (0 open1 closed)

Has duplicate Ruby master - Bug #6523: typos/display errors in Regexp.html pageCloseddrbrain (Eric Hodel)06/01/2012Actions
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0