From: 7stud -- Date: 2008-05-20T09:35:44+09:00 Subject: Re: How is this split method working? Raj Singh wrote: > length = 20 > text = ' This forum is connected to a mailing list that is read by > thousands of people.' > > > text.split[0..length] > > I looked at the split api but can't understand how the above code is > working. split() returns an array, and: arr = [10, 20, 30, 40] p arr slice = arr[0..2] p slice --output:-- [10, 20, 30, 40] [10, 20, 30] -- Posted via http://www.ruby-forum.com/.