Changes in
3e13bf3 broke tests for Ruby 1.9.3 which doesn't support
Enumerable on Strings. Workaround this by casting everything as an array and
flattening to prevent existing arrays from being encapsulated.
# Here we iterate across our values to generate an array of keys
@resource_list.reverse.each do |k|
resource_map_key = @resource_map[k]
- resource_map_key.each do |opt|
+ [resource_map_key].flatten.each do |opt|
if values.slice!(/\s#{opt}/)
keys << k
break
next
end
- args << resource_map[res].first.split(' ')
+ args << [resource_map[res]].flatten.first.split(' ')
# For sport and dport, convert hyphens to colons since the type
# expects hyphens for ranges of ports.