From: harryo@... (Harry Ohlsen) Date: 2001-02-25T18:40:05+09:00 Subject: [ruby-talk:11525] Re: ANN: ri - the Ruby Interactive reference On Sun, 25 Feb 2001 09:15:06 GMT, harryo@zipworld.com.au (Harry Ohlsen) wrote: >On 25 Feb 2001 02:45:14 -0500, Jonathan Feinberg >wrote: > >>Thank you! Unfortunately, the distro as it currently stands is >>partially Windows-hostile, as Windows files cannot have colons in >>their names. However, it works just fine except for the colon-laden >>info files. I did also create a file "ri" which itself invokes >>"ri.rb", to save myself a few keystrokes. :) > >The classes with embedded colons don't seem to work for me on Redhat >Linux 7.0, either. It seems to think "File::Stat" refers to a "Stat" >method of "File". I changed the main code in "ri.rb" to the following and it now seems to handle these cases (I've left the original lines as comments, so you can see what I changed) Of course, YMMV ... -------------------------------------------------------- # With no parameters, list know classes and modules if ARGV.size.zero? usage exit end ARGV.each do |name| case name #when /^[A-Z]\w*$/ when /^[A-Z][\w:]*$/ describeClass(name) #when /^([A-Z]\w*)(\.|\#|::)(.+)/ when /^([A-Z][\w:]*)(\.|\#)(.+)/ describeMethod($1, $2, $3) else findAndDescribe(name) end