lib/hirb/util.rb in hirb-0.6.1 vs lib/hirb/util.rb in hirb-0.6.2

- old
+ new

@@ -33,10 +33,10 @@ # 1-3,5-6 -> [1,2,3,5,6] # * -> all elements in array # '' -> [] def choose_from_array(array, input, options={}) options = {:splitter=>","}.merge(options) - return array if input.strip == '*' + return array if input[/^\s*\*/] result = [] input.split(options[:splitter]).each do |e| if e =~ /-|\.\./ min,max = e.split(/-|\.\./) slice_min = min.to_i - 1