diff options
| author | Matt Robinson <matt@puppetlabs.com> | 2011-03-29 11:06:58 -0700 |
|---|---|---|
| committer | Matt Robinson <matt@puppetlabs.com> | 2011-03-29 11:06:58 -0700 |
| commit | 54f15b6eae233c291ef14c4224ee1280aa09761e (patch) | |
| tree | 8b4327a69f2fbe268526ad828c35019154f7a4f9 /lib/puppet/parser | |
| parent | 6985cc0f898d71dbd2ffbb353a2a482d9783cb42 (diff) | |
| parent | 1ac7f63f00c517c6dff67be8d927b968c7bcb6ea (diff) | |
| download | puppet-54f15b6eae233c291ef14c4224ee1280aa09761e.tar.gz puppet-54f15b6eae233c291ef14c4224ee1280aa09761e.tar.xz puppet-54f15b6eae233c291ef14c4224ee1280aa09761e.zip | |
Merge branch 'ticket/next/6830-ready_to_merge' into next
* ticket/next/6830-ready_to_merge:
(#6830) Fix tests that depended on special inherited behavior
(#6830) Fix overly stubbed tests
(#6830) Fix instance_variables now comes back as symbols
(#6830) Fix badly stubbed Time object in test
(#6830) Fix MD5 handling to work with Ruby 1.9
(#6830) Fix File class scoping
(#6830) Handle case where array is actually a string
(#6830) Fix case where instance_variables returns symbols in Ruby 1.9
Diffstat (limited to 'lib/puppet/parser')
| -rw-r--r-- | lib/puppet/parser/functions/fqdn_rand.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/puppet/parser/functions/fqdn_rand.rb b/lib/puppet/parser/functions/fqdn_rand.rb index 52946f2c1..91157a148 100644 --- a/lib/puppet/parser/functions/fqdn_rand.rb +++ b/lib/puppet/parser/functions/fqdn_rand.rb @@ -5,8 +5,8 @@ Puppet::Parser::Functions::newfunction(:fqdn_rand, :type => :rvalue, :doc => $random_number = fqdn_rand(30) $random_number_seed = fqdn_rand(30,30)") do |args| - require 'md5' + require 'digest/md5' max = args.shift - srand MD5.new([lookupvar('fqdn'),args].join(':')).to_s.hex + srand(Digest::MD5.hexdigest([lookupvar('fqdn'),args].join(':')).hex) rand(max).to_s end |
