R
Ruohao Li
$ ruby -v
ruby 1.9.1p429 (2010-07-02 revision 28523) [i386-darwin9]
$ irb --simple-prompt=> 0
Why the above result is 0 not 1? After all there are 2 characters
in the string s. Is this a bug of String#count?
Thanks in advance.
Ruohao
ruby 1.9.1p429 (2010-07-02 revision 28523) [i386-darwin9]
$ irb --simple-prompt=> 0
Why the above result is 0 not 1? After all there are 2 characters
in the string s. Is this a bug of String#count?
Thanks in advance.
Ruohao