[#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-3329 ] String#scan loops forefever if scanned string is modified inside block.

From: <noreply@...>
Date: 2007-05-29 17:49:08 UTC
List: ruby-core #11308
Bugs item #3329, was opened at 2006-01-26 00:55
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=1698&aid=3329&group_id=426

>Category: Language / Runtime / Core Libraries
Group: None
Status: Open
Resolution: None
Priority: 3
Submitted By: Nikolai Lugovoi (meadow)
Assigned to: Nobody (None)
Summary: String#scan loops forefever if scanned string is modified inside block.

Initial Comment:
ruby 1.8.4 (2005-12-24)

Following code loops infinitely:

a = " 12345678 "; a.scan(/\d/) {|s| a[3,2]='test';  s} 

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

Comment By: Paul Duncan (pabs)
Date: 2006-01-26 12:33

Message:
I've posted a comment this on ruby-core at the following URL:

http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/7220

Basically, I'm not convinced the "fix" to this problem is better than just leaving things as-is.  My suggestion, and patch, is a clarification in the documentation that discourages people from modifying the receiving string inside a String#scan block.

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

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

In This Thread

Prev Next