X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;ds=sidebyside;f=3rdparty%2Fmodules%2Fstdlib%2Flib%2Fpuppet%2Fparser%2Ffunctions%2Funix2dos.rb;fp=3rdparty%2Fmodules%2Fstdlib%2Flib%2Fpuppet%2Fparser%2Ffunctions%2Funix2dos.rb;h=8123797f4e7d592b15f42f5f2f98175a2169509a;hb=131e09855e065be940e104d9ab0f18940cc76257;hp=0bd9cd1f12027ee616a6e3b310616555a0dc6891;hpb=407d322498f4fde815abf381007fbecfe5c10b2b;p=mirror%2Fdsa-puppet.git diff --git a/3rdparty/modules/stdlib/lib/puppet/parser/functions/unix2dos.rb b/3rdparty/modules/stdlib/lib/puppet/parser/functions/unix2dos.rb index 0bd9cd1f1..8123797f4 100644 --- a/3rdparty/modules/stdlib/lib/puppet/parser/functions/unix2dos.rb +++ b/3rdparty/modules/stdlib/lib/puppet/parser/functions/unix2dos.rb @@ -1,15 +1,15 @@ # Custom Puppet function to convert unix to dos format module Puppet::Parser::Functions - newfunction(:unix2dos, :type => :rvalue, :arity => 1, :doc => <<-EOS + newfunction(:unix2dos, :type => :rvalue, :arity => 1, :doc => <<-DOC Returns the DOS version of the given string. Takes a single string argument. - EOS - ) do |arguments| + DOC + ) do |arguments| unless arguments[0].is_a?(String) raise(Puppet::ParseError, 'unix2dos(): Requires string as argument') end - arguments[0].gsub(/\r*\n/, "\r\n") + arguments[0].gsub(%r{\r*\n}, "\r\n") end end