From 4c69e84b58f1e293ff90879d2bcf281680fab6de Mon Sep 17 00:00:00 2001 From: Kerry Buckley Date: Tue, 14 Jul 2009 19:24:29 +0100 Subject: [PATCH] Default split is fine --- 1.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/1.rb b/1.rb index dd3f928..750d5bd 100755 --- a/1.rb +++ b/1.rb @@ -5,10 +5,8 @@ require 'spec' module StringExtensions - REGEX_TO_SPLIT_ALONG_WHITESPACES = /\s+/ - def phrases(number) - strings = split(REGEX_TO_SPLIT_ALONG_WHITESPACES) + strings = split all_strings = single_double_triple_words(strings) all_strings[0, number].map {|s| "'#{s}'"}.join(', ') end