The latter returns an Enumerable which on Ruby 1.9.3 doesn't have #length available. Besides this it's better to just return an Array since we'll iterate over every character anyway.