a case sorted alphabet If the user has their collation locale set to a non-case sorted[1] option then the pattern matching in erubydoc() will install an unexpected set of files. An example would be dev-ruby/ncurses-ruby which will install the following files with en_GB.UTF-8: /usr/lib/ruby/site_ruby/1.8/i686-linux/ncurses.so /usr/lib/ruby/site_ruby/1.8/ncurses.rb /usr/share/doc/ncurses-ruby-0.9.1/Changes.gz /usr/share/doc/ncurses-ruby-0.9.1/COPYING.gz /usr/share/doc/ncurses-ruby-0.9.1/examples/example.rb /usr/share/doc/ncurses-ruby-0.9.1/examples/form2.rb /usr/share/doc/ncurses-ruby-0.9.1/examples/form.rb /usr/share/doc/ncurses-ruby-0.9.1/examples/hello_ncurses.rb /usr/share/doc/ncurses-ruby-0.9.1/examples/LICENSES_for_examples /usr/share/doc/ncurses-ruby-0.9.1/examples/rain.rb /usr/share/doc/ncurses-ruby-0.9.1/examples/read_line.rb /usr/share/doc/ncurses-ruby-0.9.1/examples/tclock.rb /usr/share/doc/ncurses-ruby-0.9.1/examples/test_scanw.rb /usr/share/doc/ncurses-ruby-0.9.1/extconf.rb.gz /usr/share/doc/ncurses-ruby-0.9.1/form_wrap.c.gz /usr/share/doc/ncurses-ruby-0.9.1/form_wrap.h.gz /usr/share/doc/ncurses-ruby-0.9.1/form_wrap.o.gz /usr/share/doc/ncurses-ruby-0.9.1/MANIFEST.gz /usr/share/doc/ncurses-ruby-0.9.1/mkmf.log.gz /usr/share/doc/ncurses-ruby-0.9.1/ncurses.so.gz /usr/share/doc/ncurses-ruby-0.9.1/ncurses_wrap.c.gz /usr/share/doc/ncurses-ruby-0.9.1/ncurses_wrap.h.gz /usr/share/doc/ncurses-ruby-0.9.1/ncurses_wrap.o.gz /usr/share/doc/ncurses-ruby-0.9.1/README.gz /usr/share/doc/ncurses-ruby-0.9.1/README.windows.gz /usr/share/doc/ncurses-ruby-0.9.1/THANKS.gz /usr/share/doc/ncurses-ruby-0.9.1/TODO.gz /usr/share/doc/ncurses-ruby-0.9.1/VERSION.gz which is incorrectly including all the files which begin with any letter of the defined locale's alphabet[2] because of the pattern matching. The attached patch fixes this by simply setting LC_COLLATE in the function to a suitable value so the match works as expected. Obviously, it has to unset LC_ALL too. There is provenance for fixing these problems, as can be seen in kernel-2.eclass and vim.eclass, so hopefully it isn't deemed as a user problem. 1. Or for that matter even a case sorted alphabet which isn't ABCDEFGHIJKLMNOPQRSTUVWXYZ will cause a different possibly larger /or/ smaller set of files to be installed. 2. Well between A and Z anyway.
Created attachment 84388 [details, diff] ruby-locale_probs.patch
committed, thanks for the report.