From: "Darryl L. Pierce" Date: 2013-05-21T22:45:00+09:00 Subject: Re: Enum#each issue --x+6KMIRAuhnl3hBn Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, May 13, 2013 at 08:16:56PM +0900, Love U Ruby wrote: > I am not able to understand why I am getting the error for the method > http://www.ruby-doc.org/core-1.9.3/Enumerator.html#method-i-each as > below: >=20 > e =3D "string".to_enum > e.each{|i| p i} >=20 > so.rb:2:in `each': undefined method `each' for "string":String > (NoMethodError) > from so.rb:2:in `
' >=20 > Can anyone help me to understand what wrong I did here? The enumerator returned is for the string "string". What are you trying to _do_? --=20 Darryl L. Pierce http://mcpierce.multiply.com/ "What do you care what people think, Mr. Feynman?" --x+6KMIRAuhnl3hBn Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.13 (GNU/Linux) iEYEARECAAYFAlGbeMcACgkQtddqM0QFuLI8swCg0k5QrT8WN7ZAxpC6YiHqdWMw jB0An3w8mhMMTTekBvSy9btsENoXtbx5 =yySB -----END PGP SIGNATURE----- --x+6KMIRAuhnl3hBn--