summaryrefslogtreecommitdiffstats
path: root/lib/puppet/util/rdoc/code_objects.rb
diff options
context:
space:
mode:
authorMatt Robinson <matt@puppetlabs.com>2011-03-28 11:52:11 -0700
committerMatt Robinson <matt@puppetlabs.com>2011-03-29 11:00:13 -0700
commitade4efea6d2d4dbee7ccfec62114df0c5dcf33e2 (patch)
tree90d27e61044ddd3444965fd75f1f5489afdd44de /lib/puppet/util/rdoc/code_objects.rb
parentbfac57a0e5e12f92c92182adae1595d4a49ca5a7 (diff)
downloadpuppet-ade4efea6d2d4dbee7ccfec62114df0c5dcf33e2.tar.gz
puppet-ade4efea6d2d4dbee7ccfec62114df0c5dcf33e2.tar.xz
puppet-ade4efea6d2d4dbee7ccfec62114df0c5dcf33e2.zip
(#6830) Fix MD5 handling to work with Ruby 1.9
In Ruby 1.9 you have to require 'digest/md5' instead of just 'md5'. The following irb sessions from each version of Ruby should explain the changes in how MD5 is used between Ruby versions and why this patch was made. ruby-1.9.2-p136 :001 > require 'md5' LoadError: no such file to load -- md5 ruby-1.9.2-p136 :002 > require 'digest/md5' => true ruby-1.9.2-p136 :003 > Digest::MD5.hexdigest('mystring') => "169319501261c644a58610f967e8f9d0" ruby-1.9.2-p136 :004 > Digest::MD5.new('mystring') => #<Digest::MD5: d41d8cd98f00b204e9800998ecf8427e> ruby-1.8.7-p330 :001 > require 'digest/md5' => [] ruby-1.8.7-p330 :002 > require 'md5' => ["MD5"] ruby-1.8.7-p330 :003 > Digest::MD5.hexdigest('mystring') => "169319501261c644a58610f967e8f9d0" ruby-1.8.7-p330 :004 > MD5.new('mystring') => #<MD5: 169319501261c644a58610f967e8f9d0> ruby-1.8.7-p330 :005 > MD5.new('mystring').to_s => "169319501261c644a58610f967e8f9d0" ruby-1.8.7-p330 :006 > Digest::MD5.new('mystring') ArgumentError: wrong number of arguments (1 for 0) Reviewed-by: Jesse Wolfe <jesse@puppetlabs.com>
Diffstat (limited to 'lib/puppet/util/rdoc/code_objects.rb')
0 files changed, 0 insertions, 0 deletions