Project

General

Profile

Actions

Misc #8548

closed

Correction for a String#include? usage example

Misc #8548: Correction for a String#include? usage example

Added by mattonrails (Matthew Conway) over 12 years ago. Updated over 12 years ago.

Status:
Rejected
[ruby-core:55565]

Description

I've fixed a usage example for String#include? that was not valid Ruby. This is my first attempt at submitting an issue or patch for Ruby, so please pardon any errors. Thank you!


Files

Updated by Anonymous over 12 years ago Actions #1 [ruby-core:55566]

  • Status changed from Open to Rejected

?h is actually valid Ruby - it's shorthand for "h".

irb(main):001:0> "hello".include? ?h
=> true

Updated by mattonrails (Matthew Conway) over 12 years ago Actions #2 [ruby-core:55576]

Thanks, Charlie. While the shorthand is valid, the actual problem is that the question mark does not appear when viewing the generated documentation (screenshot: http://cl.ly/Pmx1). Is there a way to escape that character so it appears and makes the rendered docs valid?

Updated by zzak (zzak _) over 12 years ago Actions #3 [ruby-core:55899]

@mattonrails this bug was actually fixed just recently in rdoc, see https://github.com/rdoc/rdoc/issues/220

Updated by mattonrails (Matthew Conway) over 12 years ago Actions #4 [ruby-core:56026]

@zzak (zzak _) even better; thanks for the heads-up :)

Actions

Also available in: PDF Atom