Browse files

Work in Ruby 1.8 as well as 1.9

  • Loading branch information...
1 parent a514d4f commit d597ff6c8966f4b5fb5d4d83711dfab771c436a7 @fritz fritz committed Aug 24, 2011
Showing with 8 additions and 0 deletions.
  1. +8 −0 lib/puppet/provider/rvm_system_ruby/rvm_system_ruby.rb
View
8 lib/puppet/provider/rvm_system_ruby/rvm_system_ruby.rb
@@ -1,3 +1,11 @@
+# Backport :lines to 1.8 if necessary
+# See http://oreilly.com/ruby/excerpts/ruby-best-practices/writing-backward-compatible.html
+class String
+ unless "".respond_to?(:lines)
+ alias_method :lines, :to_a
+ end
+end
+
Puppet::Type.type(:rvm_system_ruby).provide(:rvm) do
desc "Ruby RVM support."

0 comments on commit d597ff6

Please sign in to comment.