Modify bug by String.chars in Ruby 1.9.3