chruby.el icon indicating copy to clipboard operation
chruby.el copied to clipboard

Approximate/fuzzy ruby versions may mismatch

Open lazyatom opened this issue 8 years ago • 1 comments

The original chruby command allows specifying "fuzzy" ruby versions without the patch number, e.g. 2.4 which will load the highest matching available version from the 2.4 series.

Unfortunately, chruby.el does not understand this, and can actually mismatch if there's another version of ruby available which contains the "fuzzy" substring. Concretely, if you have 2.2.4 and 2.4.1 installed, calling chruby-use-corresponding when .ruby-version contains 2.4 will activate 2.2.4, not 2.4.1.

I'm a totally elisp newbie, but I think the fix will be on this line: https://github.com/plexus/chruby.el/blob/3eddd2f5fc2ac979b496394c74e4aee436b64a28/chruby.el#L82

lazyatom avatar Sep 03 '17 20:09 lazyatom

Hi @lazyatom, thanks for the suggestion. This seems like a useful addition. I'd be happy to review a pull request if someone feels like tackling this.

plexus avatar Sep 14 '17 13:09 plexus