From: "Peña, Botp" Date: 2005-07-08T18:20:26+09:00 Subject: [patch] for ri case sensitivity (was - RE: disable ri case sensit ive) ##> Arg, i'm in windows and i cannot even find ri.rb. I guess it ##is not written ##> in ruby, no? ## ##I guess you already found this, but it's called ri.bat which is just a ##wrapper for ri. And the source for ri is in lib\ruby\1.8\rdoc\ri. ## # #you guess wrong, i'm dumber than you think :-) # #Thanks for the info, Cris. I'll check.. # #kind regards -botp # ok, i got a hack. pardon me if it's too elementary or buggy or what, but hey, it works great for me and i have lesser worry on my casing/typing :-) btw, is there a proper_case in ruby? like "test".proper_case => "Test" patch follows --------------------------- C:\ruby\lib\ruby\1.8\rdoc\ri>diff ri_util.rb ri_util.rb.orig 3,9d2 < # pardon me with this, but i cannot find a proper_case string fxn < class String < def proper_case < self[0,1].upcase + (self[1..-1]? self[1..-1].downcase : "") < end < end < 40,59c33 < < # all programmers are lazy < # so, let us take care of the casing thing < < if tokens.size < 2 < # it's a word; check if the casing is garbled < t = tokens[0] < if (t != t.downcase) and < (t != t.proper_case) < t.downcase! # it's garbled; defaulting to downcase (as method) < end < else < # propercase them all < tokens.map!{ |x| x.proper_case } < # methods should be downcased however < if tokens[-2] =~ /\.|#|/ < tokens[-1] = tokens[-1].downcase < end < end < --- > 64a39 > 67d41 < 101,102d74 < < 104d75