find_targets() in /usr/share/eselect/modules/ruby.eselect has available version hard coded: for t in ${EROOT}${bindir}/${1:-ruby}{18,19,20,21,22} ; do [[ -e $t ]] || continue echo ${t} done Right now, you can't eselect ruby 2.3 because of this implementation. A much smarter (and simple) way to accomplish the same task could be the following: echo "dev-lang/ruby" | eix '-|*' --format '<installedversions:NAMESLOT>' dev-lang/ruby | cut -f 2 -d: | sed "s/\.//" Reproducible: Always
and it would also depend on eix.
This would depend on findutils and coreutils: find /usr/bin/ -type f -name "ruby*" -exec basename {} \; Ok?
I have now added eselect-ruby-20151229 with support for ruby23. Apologies for overlooking this when adding the new version. We've discussed a more dynamic approach like the one proposed here in the ruby team, but we feel that it is better to keep working with a whitelist of specific ruby versions. The dynamic approach could lead to unexpected side-effects in the future e.g. when someone adds a tool starting with ruby in /usr/bin. Thanks for the report and suggestions.
(In reply to Hans de Graaff from comment #3) > We've discussed a more dynamic approach like the one proposed here in the > ruby team, but we feel that it is better to keep working with a whitelist of > specific ruby versions. The dynamic approach could lead to unexpected > side-effects in the future e.g. when someone adds a tool starting with ruby > in /usr/bin. Nothing that cannot be worked out with a small regex, IMHO. Anyway, thanks.
find /usr/bin/ -type f -name "ruby[23][0-9]" -exec basename {} \; This covers anything between ruby20 and ruby39 (without visible side effects).
(In reply to Ivan Iraci from comment #5) > find /usr/bin/ -type f -name "ruby[23][0-9]" -exec basename {} \; > > This covers anything between ruby20 and ruby39 (without visible side > effects). Does it work with Gentoo prefix? What about support for rubinius and jruby? It's not that easy, and the easiest way for now is to update it in a new eselect release. ;)
(In reply to Manuel Rüger from comment #6) > > find /usr/bin/ -type f -name "ruby[23][0-9]" -exec basename {} \; > Does it work with Gentoo prefix? > What about support for rubinius and jruby? > > It's not that easy, and the easiest way for now is to update it in a new > eselect release. ;) So you really want a full ebuild implementation from me... :) Does the following for block support rubinius and jruby?!? How does it? :) for t in ${EROOT}${bindir}/${1:-ruby}{18,19,20,21,22,23} ; do [[ -e $t ]] || continue echo ${t} done Well, can't we say that this is at least not less working than the current for block? find ${EROOT}${bindir} -type f -name "ruby[23][0-9]" -exec basename {} \; Are you able to find some regex matching jruby and rbx executables? I am. And I am not a regex black belt (to be honest, I'm pretty good at regexes, but you don't really have to be for such a simple task). Please, don't disguise bias or lazyness as technical reasons. If you have strong technical reasons against my arguments, use them. Or just say you don't have the time to do it or... whatever.
(In reply to Hans de Graaff from comment #3) > I have now added eselect-ruby-20151229 with support for ruby23. Apologies > for overlooking this when adding the new version. That's not enough. You also need to raise the eselect-ruby dependency in the ruby-2.3.0 ebuild.
(In reply to Davide Pesavento from comment #8) > That's not enough. You also need to raise the eselect-ruby dependency in the > ruby-2.3.0 ebuild. Done.