I have assigned this bug to Eric in order to get information on how to proceed from him; assigning it back to me with some instructions on what to do is fine.
jonathan rochkind wrote:
The new in 2.2 String#unicode_normalize and String#unicode_normalized? methods are very useful.
Thanks!
But they do not seem to appear in the generated ruby API docs, which means many people won't realize they exist.
http://ruby-doc.org/core-2.2.0/String.html
Does not mention any unicode_normalize
method. Should it?
I guess yes.
There is generated docs for a UnicodeNormalize module at http://ruby-doc.org/stdlib-2.2.0/libdoc/unicode_normalize/rdoc/UnicodeNormalize.html , but it documents methods with different names, just normalize
and normalized?
. I think these are the same methods. I am not sure if this module is what is used in String? I am not sure why the method names differ, or why they don't show up directly in the generated String API docs.
The methods in the UnicodeNormalize module are the backend implementations for the methods on String. Except for people interested in how the methods on String are implemented, it doesn't make much sense for these (or anything else from UnicodeNormalize) to appear in the public documentation. If somebody know the magic trick for excluding this module from the documentation, please tell me. [It won't hurt too much if it stays in the documentation, though.]
If they could show up in the generated String API docs, with the correct method names, it would make it easier for developers to discover their existence and proper method names and functionality.
The actual documentation for String#unicode_normalize, String#unicode_normalize!, and String#unicode_normalized? is in lib/unicode_normalize.rb (see e.g. http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/lib/unicode_normalize.rb?revision=49064&view=markup). http://ruby-doc.org/core-2.2.0/String.html shows that the information is taken from various files (complex.c, pack.c, rational.c, string.c, transcode.c), but this seems to miss lib/unicode_normalize.rb.
I'm not sure why this happens, or what can be done about it, at this time or in the long term. I have therefore assigned this issue to Eric Hodel and hope to hear back from him with some advice as to how to proceed.