From: Tomas Na Date: 2009-04-07T00:14:04+09:00 Subject: Re: String.split crashes my program It reaches a block of code which causes it to become unresponsive. That to me indicates a crash. Maybe not to you, but this discussion isn't about semantics. Here is my output: C:\Users\Tomas\Ruby>ruby test.rb Split this text Then nothing. We sit here for ever while it "hasnt" crashed. My Ruby version is: ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32] Running on Windows 7 The other split that works is: def ProcessHeaders(sHead) hHeaders = {} sHead.each{|line| saHeadParts = line.split(/: /) hHeaders[saHeadParts[0]]=saHeadParts[1] } return hHeaders end For processing HTTP headers. I appreciate that my Ruby coding conventions may not match the standard but I have been programming Ruby for only a day so far and I came here from C++, so I was just sticking to what I know. That can be refactored later, I'd rather have a working program than a conventional one. I tried your scan example which did what I was trying to do, so if all else fails I will use that. Thanks for the help. -- Posted via http://www.ruby-forum.com/.