diff --git a/libraries/chef_rvm_set_helpers.rb b/libraries/chef_rvm_set_helpers.rb index 67e1d60b..63924386 100644 --- a/libraries/chef_rvm_set_helpers.rb +++ b/libraries/chef_rvm_set_helpers.rb @@ -3,7 +3,8 @@ module RVM module SetHelpers def rvm_do(user = nil) # Use Gem's version comparing code to compare the two strings - if Gem::Version.new(VersionCache.fetch_version(user)) < Gem::Version.new("1.8.6") + rvm_version = VersionCache.fetch_version(user).gsub(/(-|_|#)/, '.') + if Gem::Version.new(rvm_version) < Gem::Version.new("1.8.6") "exec" else "do"