Permalink
Browse files

Ruby 1.9.2 compat: String isn't enumerable anymore:

  • Loading branch information...
1 parent 5ca31ae commit ebfb59beb14584facb8be401aed7a3a5b15b57c8 @johnf johnf committed Aug 14, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/puppet/provider/rvm_system_ruby/rvm_system_ruby.rb
View
4 lib/puppet/provider/rvm_system_ruby/rvm_system_ruby.rb
@@ -13,7 +13,7 @@ def destroy
def exists?
begin
- rvmcmd("list", "strings").any? do |line|
+ rvmcmd("list", "strings").lines.any? do |line|
line =~ Regexp.new(Regexp.escape(resource[:name]))
end
rescue Puppet::ExecutionFailure => detail
@@ -24,7 +24,7 @@ def exists?
def default_use
begin
- rvmcmd("list", "default", "string").any? do |line|
+ rvmcmd("list", "default", "string").lines.any? do |line|
line =~ Regexp.new(Regexp.escape(resource[:name]))
end
rescue Puppet::ExecutionFailure => detail

0 comments on commit ebfb59b

Please sign in to comment.