From: jake kaiden Date: 2011-11-13T11:12:02+09:00 Subject: Re: Using gets and split hi Reese, > all_input = gets > all_input = all_input.to_s.split("\n") the #to_s method is unnecessary here, as #gets returns a String already if you're splitting on new lines ("\n"), everything you get with `gets` will be in one element of the array, as there is only one new line... similarly, if you change the string to be "soandsoandsoandso," it will still wind up as only one element of the array, as there is only one new line... for comparison, try: str = "soandsoandso" arr = str.split("o") p arr => ["s", "ands", "ands"] - j -- Posted via http://www.ruby-forum.com/.