minor fix to match function to handle array

Without this patch,  `match('a', ['abc', 'ab', 'bb'])` returns `''` (empty string). After applying the patch, the method returns `'abc ab'`.