# File lib/AWS.rb, line 195 195: def pathlist(key, arr) 196: params = {} 197: 198: # ruby 1.9 will barf if we pass in a string instead of the array expected. 199: # it will fail on each_with_index below since string is not enumerable. 200: if arr.is_a? String 201: new_arr = [] 202: new_arr << arr 203: arr = new_arr 204: end 205: 206: arr.each_with_index do |value, i| 207: params["#{key}.#{i+1}"] = value 208: end 209: params 210: end