Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Approximate/fuzzy ruby versions may mismatch #19

Open
lazyatom opened this issue Sep 3, 2017 · 1 comment
Open

Approximate/fuzzy ruby versions may mismatch #19

lazyatom opened this issue Sep 3, 2017 · 1 comment

Comments

@lazyatom
Copy link

lazyatom commented Sep 3, 2017

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:

(and (string-match name ruby) ruby))

@plexus
Copy link
Owner

plexus commented Sep 14, 2017

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants