Skip to content
Browse files

gemsets don't include newlines (closes #25)

  • Loading branch information...
1 parent 49b9463 commit 454be975ea576b7efa55434aff3ef25feaa2cc99 @senny committed
Showing with 7 additions and 1 deletion.
  1. +1 −1 rvm.el
  2. +6 −0 tests/rvm-unit-tests.el
View
2 rvm.el
@@ -104,7 +104,7 @@ This path gets added to the PATH variable and the exec-path list.")
rvm--gemset-separator
"\n]+\\)\\(?:"
rvm--gemset-separator
- "\\([^\"\s]+\\)\\)?\\(?:\"\\|\\)")
+ "\\([^\"\s\n]+\\)\\)?\\(?:\"\\|\\)")
"regular expression to parse the .rvmrc files inside project directories.
the first group matches the ruby-version and the second group is the gemset.
when no gemset is set, the second group is nil")
View
6 tests/rvm-unit-tests.el
@@ -117,3 +117,9 @@ fi
# rvm gemset import \"$filename\" | grep -v already | grep -v listed | grep -v complete | sed '/^$/d'
# fi\"")
'("ruby-1.9.2-p180-patched" "something"))))
+
+(ert-deftest rvm-unit-test-rvmrc-parse-version-with-rvm-generated-rvmrc ()
+ (should (equal (rvm--rvmrc-parse-version "rvm use --create 1.9.2@project
+
+# Something")
+ '("1.9.2" "project"))))

0 comments on commit 454be97

Please sign in to comment.
Something went wrong with that request. Please try again.