From: niklas | brueckenschlaeger Date: 2010-11-29T21:05:03+09:00 Subject: Re: Can any one explain ARGV,gets.chomp() command line arguments same .rbfile --=-5kx7Fp15Ojh+CTbFnbLg Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable the regular "gets" opens & reads ARGV[0], if given. Use $stdin.gets instead. On Mon, 2010-11-29 at 21:01 +0900, Durga B. wrote: > In cmdline.rb file: >=20 > puts ARGV[0] > puts "Enter a no " > val =3Dgets.chomp.to_i() >=20 > Come to command prompt > Go to taht file path>cmdline.rb prasad > cmdline.rb:15:in`gets`:no such file or directory-prasad(Errorno::ENOENT) > from cmdline.rb >=20 --=-5kx7Fp15Ojh+CTbFnbLg Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iQIcBAABAgAGBQJM85bhAAoJEIQdQGZOjo82TJIP/RviLFgfoexdI3sIKuty6IOF lWO+olY7rSpI+4Ph3fHpPeRWwrmXyeH4h1AJylBulHJ89i3SU2Yblv/YR9Nxbamm 65z2SfZxdd3kNKnX9pjtZ0n6OsC7cwrZkk12ZdkTV30YDNdnchqKVIXPZDjXZd5A 8WTRTt0dhm38af76BCfLgqqTSWLvmo57tD1+J2H/e0y/GjqFPUh0hh+prdoCCoYA HX1LlQKM0MIx+XGRUA9HrGckYibLep/kevmdPjt+g9+6107RS4QTKdBL9O7KkHcC qumT9bvs9kBqG6Mcnxi2Vn8rA+hKSn2Mxb4LFG7aYIwgkihnOy7tFUSVt4XWYmPW WC2rNrh87+5pU5TM0/dYmZf+r9F8qorHxp9sr3UnYIOPsOxZXD9TxNuTS3fV7a32 OOJgdmafWbWO6DfrExaxbvo6wMm2AHdoNJh7nhJyIu3ewe6layALvPKyubqezsU8 s6m9Lu4nhDC4NUjhNvMAcHAPv5IcbdIdMG/P1bHA/JzLISSAjjPxpAPWFDqobQpz 33vB6zUCRj52tW5HUj9RA540OB3obAK88llODqCc7FLDDT2vr7IXAKSrm+TdgeQj BffbY1fTJ+Ota6wZbcFsWTbE3dgzaeNcQZkjc4s3mCvrY6rDvICyM32dtFNww2pC dGD5L0DeE9wiMhfXSX// =nJb8 -----END PGP SIGNATURE----- --=-5kx7Fp15Ojh+CTbFnbLg--