Fix Ruby 1.9 compatibility

Strings are not longer iterable.