Re: Class:Hash
Roger Pack <[email protected]> Tue, 28 Dec 2010 22:03:06 -0700
| Newsgroups | gmane.comp.lang.ruby.documentation |
|---|---|
| Message-ID | <[email protected]> |
> Although chances are low that #key is used often, Class hash does offer t= his > method. Hence I guess it should be working correctly (which it does imho) > and it should be documented correctly. This is what I wanted to > discuss/clarify in this thread. > > Any more opinions on the documentation of #key? Shouldn't there be someth= ing > in the documentation of hash#key like "... If there is more then one > occurance of the value the first key is returned"=A0=A0=A0 (addendum: in = my first > eMail I mixed value and key. I just corrected this here) That sounds like a reasonable addition. The only "blessed" documenation source is the ruby core source code itself. I'd write up a patch and submit it. http://www.ruby-lang.org/en/community/ruby-core/