Support Ruby 1.9

Because the error occurred on Ruby 1.9.3:

    NoMethodError(<undefined method `length' for #<Enumerator: "A":bytes>>)