ycsunil wrote:
> C:\Documents and Settings\sunilc\Desktop>ruby test.rb 'add'
> input something
> test.rb:3:in `gets': No such file or directory - add (Errno::ENOENT)
> =A0 =A0 =A0 =A0 from test.rb:3
>
> Please let me know why is this error coming?

Kernel#gets tries to read from the file specified by the command line=20
arguments if there are any. This is documented (and in some cases useful).
If you don't want this behaviour use IO#gets directly (as in: STDIN.gets).

HTH,
Sebastian
=2D-=20
Jabber: sepp2k / jabber.org
ICQ: 205544826