Fix faulty implementation of String#to_range