[#11073] segfault printing instruction sequence for iterator — <noreply@...>

Bugs item #10527, was opened at 2007-05-02 14:42

14 messages 2007/05/02
[#11142] Re: [ ruby-Bugs-10527 ] segfault printing instruction sequence for iterator — Nobuyoshi Nakada <nobu@...> 2007/05/10

Hi,

[#11188] Re: [ ruby-Bugs-10527 ] segfault printing instruction sequence for iterator — Paul Brannan <pbrannan@...> 2007/05/16

On Thu, May 10, 2007 at 04:51:18PM +0900, Nobuyoshi Nakada wrote:

[#11234] Planning to release 1.8.6 errata — Urabe Shyouhei <shyouhei@...>

Hi all.

17 messages 2007/05/25

[ ruby-Bugs-6034 ] Documentation for String.scan has a bad example.

From: <noreply@...>
Date: 2007-05-10 00:47:54 UTC
List: ruby-core #11131
Bugs item #6034, was opened at 2006-10-05 18:56
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=1698&aid=6034&group_id=426

Category: Documentation
Group: 1.8.x
Status: Open
Resolution: None
Priority: 3
Submitted By: Kulpreet Singh (jungly)
Assigned to: Eric Hodel (drbrain)
Summary: Documentation for String.scan has a bad example.

Initial Comment:
The documentation for String.scan says -

And the block form:

        a.scan(/\w+/) {|w| print "<<#{w}>> " }
        print "\n"
        a.scan(/(.)(.)/) {|a,b| print b, a }
        print "\n"

     _produces:_

        <<cruel>> <<world>>
        rceu lowlr

In the statement 
a.scan(/(.)(.)/) {|a,b| print b, a }

the use of variable "a" inside the block confuses the novice.

Its a simple variable fix.

Thanks



----------------------------------------------------------------------

Comment By: Nobuyoshi Nakada  (nobu)
Date: 2007-05-10 09:47

Message:
This bug is fixed in the repository.

----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=1698&aid=6034&group_id=426

In This Thread

Prev Next