From: cdc@...2go.com (Cliff Cyphers) Date: 2006-05-20T00:46:11+09:00 Subject: Re: problems with irb? str = 'a\b\c' seems impossible --y0ulUmNC+osPPQO6 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, May 20, 2006 at 12:19:10AM +0900, Krekna Mektek wrote: > Can someone help me out with this, I can't put the string 'a\b\c' in > the variable str, which is strange, because I am working with the > PickAxe book, and this what should work (page 71, 2nd ed.) >=20 > the two before seem to work, but the example in the book, 'a\b\c' seems n= ot. > This a bug? How come irb does not seem to understand the last quote? >=20 > irb(main):021:0> str =3D 'a\b\c ' > =3D> "a\\b\\c " > irb(main):022:0> str =3D 'a\bc' > =3D> "a\\bc" > irb(main):023:0> str =3D 'a\b\c' > irb(main):024:0' > irb(main):025:0' ' > SyntaxError: compile error > (irb):25: unterminated string meets end of file > from (irb):25 > from :0 > str=3D"a\\b\\c" --y0ulUmNC+osPPQO6 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (GNU/Linux) iD8DBQFEbehApXfXwRYlDA0RAmIpAJ9xgNcPk8fcXX4fV+jKg89YEFasNwCaAnYe tcSSGGrOADM9JfWuAu10WX0= =V1NP -----END PGP SIGNATURE----- --y0ulUmNC+osPPQO6--