Update stdlib and concat to 6.1.0 both
[mirror/dsa-puppet.git] / 3rdparty / modules / stdlib / lib / puppet / parser / functions / unix2dos.rb
index 0bd9cd1..91b2596 100644 (file)
@@ -1,15 +1,20 @@
 # Custom Puppet function to convert unix to dos format
 module Puppet::Parser::Functions
-  newfunction(:unix2dos, :type => :rvalue, :arity => 1, :doc => <<-EOS
-    Returns the DOS version of the given string.
+  newfunction(:unix2dos, :type => :rvalue, :arity => 1, :doc => <<-DOC
+    @summary
+      Returns the DOS version of the given string.
+
+    @return
+      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