This project is closed and read-only.
Actions
Backport #3747
closedPossible bug of String#count?
Backport #3747:
Possible bug of String#count?
Status:
Closed
Assignee:
Description
=begin
$ ruby -v
ruby 1.9.1p429 (2010-07-02 revision 28523) [i386-darwin9]
$ cat c.rb
-- coding: utf-8 --¶
s = "a\u3042" # \u3042 is the japanese hiragana "a"
puts s.encoding.name
puts s.count("^a")
$ ruby c.rb
UTF-8
0
The result of count method should be 1 but is 0.
=end
Actions