Bug #6488
closedString#slice example has a syntax error
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.
Updated by shyouhei (Shyouhei Urabe) over 12 years ago
- Category set to doc
- Status changed from Open to Assigned
- Assignee set to drbrain (Eric Hodel)
Seems this is a renderer issue. Eric, what do you think?
Updated by zzak (zzak _) over 12 years ago
I was unable to reproduce this with ruby 1.9.3p125 (2012-02-16 revision 34643) [x86_64-linux] and rdoc 3.9.4
Could be an issue with ruby-doc.org?
Updated by drbrain (Eric Hodel) over 12 years ago
This is a bug in RDoc's ruby parser
Updated by drbrain (Eric Hodel) over 12 years ago
- Status changed from Assigned to Closed
Fixed by eaf2b80c and 0d72fc0d to the rdoc repository.
Updated by nathanst (Nathan Stratton Treadway) over 12 years ago
The references to the RDoc github commits don't show up as live links, so to save others the trouble of finding them, here are URLs for each:
https://github.com/rdoc/rdoc/commit/eaf2b80c
Updated by nathanst (Nathan Stratton Treadway) over 12 years ago
=begin
zzak (Zachary Scott) wrote:
I was unable to reproduce this with ruby 1.9.3p125 (2012-02-16 revision 34643) [x86_64-linux] and rdoc 3.9.4
Could be an issue with ruby-doc.org?
More specifically, it was a problem in the HTML pages generated by RDoc v3.12 (and ruby-doc.org was indeed using that version).
Over the weekend James Britt regenerated the "core" and "std=lib" RDoc pages (for all Ruby versions) using a copy of rdoc that included this bug's ruby_lex.rb patches, so the regexp literals on those pages should be fixed now.
(The gem RDocs on the site are built separately and so they may not have been updated yet.)
=end