From: Robert Feldt Date: 2001-02-27T18:44:53+09:00 Subject: [ruby-talk:11674] small ri patch Hi, Since ri now supports abbreviations via prefix matching we should be able to give abbreviations of length 1. Patch is below. Another thought on ri: I proposed some time ago that we should base a simple documentation format on the formats used by Dave&Andy in the book and now (in another form) in ri. I still think this would be a good thing. Anyone else got ideas on this? Would it suffice if I/we do a simple parser outputting stuff the way ri documentation is formatted? (Or is too much info lost there to get back to XML?) Would also be good with a short list of advice on how to write docs the "pickaxe way". Dave? Regards, Robert --- ri.old Tue Feb 27 09:04:56 2001 +++ ri Tue Feb 27 10:31:22 2001 @@ -286,11 +286,11 @@ case name - when /^[A-Z]\w+(::[A-Z]\w+)?$/ + when /^[A-Z](\w+)?(::[A-Z](\w+)?)?$/ describeClass(name) - when /^([A-Z]\w+(::[A-Z]\w+)?)(\.|\#|::)(.+)/ - describeMethod($1, $3, $4) + when /^([A-Z](\w+)?(::[A-Z](\w+)?)?)(\.|\#|::)(.+)/ + describeMethod($1, $5, $6) else findAndDescribe(name)