Afficher un message
Vieux 16/09/2007, 13h05   #2
Bil Kleb
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: NoMethodError: undefined method `scanf' for main:Object

Alex Shulgin wrote:
> Hi,


Hi.

> Trying to call $stdin.scanf() does not either (NoMethodError).
> What I'm missing?


I don't know, but the ri docs sure are sparse for ruby 1.8.6 (2007-03-13):

$ ri scanf
More than one method matched your request. You can refine
your search by asking for information on one of:

IO#block_scanf, IO#scanf, Kernel#scanf, String#block_scanf,
String#scanf

$ ri Kernel.scanf
----------------------------------------------------------- Kernel#scanf
scanf(fs,&b)
------------------------------------------------------------------------
(no description...)

But the original project examples at

http://www.rubyhacker.com/code/scanf/

might get you going...

Regards,
--
Bil Kleb
http://nasarb.rubyforge.org
  Réponse avec citation
 
Page generated in 0,05256 seconds with 9 queries