lib/puppet/util.rb in puppet-3.0.1 vs lib/puppet/util.rb in puppet-3.0.2.rc1

- old
+ new

@@ -230,14 +230,10 @@ slash = '[\\\\/]' label = '[^\\\\/]+' AbsolutePathWindows = %r!^(?:(?:[A-Z]:#{slash})|(?:#{slash}#{slash}#{label}#{slash}#{label})|(?:#{slash}#{slash}\?#{slash}#{label}))!io AbsolutePathPosix = %r!^/! def absolute_path?(path, platform=nil) - # Due to weird load order issues, I was unable to remove this require. - # This is fixed in Telly so it can be removed there. - require 'puppet' unless defined?(Puppet) - # Ruby only sets File::ALT_SEPARATOR on Windows and the Ruby standard # library uses that to test what platform it's on. Normally in Puppet we # would use Puppet.features.microsoft_windows?, but this method needs to # be called during the initialization of features so it can't depend on # that. @@ -532,12 +528,13 @@ Puppet.deprecation_warning("Puppet::Util.execfail is deprecated; please use Puppet::Util::Execution.execfail") Puppet::Util::Execution.execfail(command, exception) end module_function :execfail - def execute(command, arguments = {}) + def execute(*args) Puppet.deprecation_warning("Puppet::Util.execute is deprecated; please use Puppet::Util::Execution.execute") - Puppet::Util::Execution.execute(command, arguments) + + Puppet::Util::Execution.execute(*args) end module_function :execute end end