R
Rich
I looked at the RDoc for the String class and found that the class
includes the Enumerable module. I'd have thought that meant that you
could call methods like inject or collect on a string, the method
would iterate over all the characters in the string.
However, I get the following instead:
Am I misunderstanding how include works in this case? Thanks alot.
-Rich
includes the Enumerable module. I'd have thought that meant that you
could call methods like inject or collect on a string, the method
would iterate over all the characters in the string.
However, I get the following instead:
=3D=3D> [12345] # instead of the expected [1,2,3,4,5]."12345".collect { |x| x.to_i}
Am I misunderstanding how include works in this case? Thanks alot.
-Rich