From: Rick DeNatale Date: 2009-05-08T02:08:48+09:00 Subject: Re: No documentation for File's methods? 2009/5/7 Jörg W Mittag : > Albert Schlef wrote: >> We can do the following... >> >>    File.open('somefile.txt') >> >>    File.foreach('somefile') >> >> ..and I'm trying to see the documentation for these class methods. >> >> So I execute "ri File#open" and "ri File#foreach" and I get nothing. > > Wrong class: they are defined in IO, File just inherits them. True, but fri/qri finds inherited methods: $ qri File.open ------------------------------------------------------------ Kernel#open open(path [, mode [, perm]] ) => io or nil open(path [, mode [, perm]] ) {|io| block } => obj ------------------------------------------------------------------------ ... $ qri File.foreach ------------------------------------------------------------ IO::foreach IO.foreach(name, sep_string=$/) {|line| block } => nil ------------------------------------------------------------------------ ... I suspect the OP has a corrupted fast_ri index which needs to be rebuilt. -- Rick DeNatale Blog: http://talklikeaduck.denhaven2.com/ Twitter: http://twitter.com/RickDeNatale WWR: http://www.workingwithrails.com/person/9021-rick-denatale LinkedIn: http://www.linkedin.com/in/rickdenatale