Yeah, OK, I think I found it.
In /usr/local/lib/ruby/site_ruby/1.8, I found this little file:
8 -rw-r--r--@ 1 root wheel 257 Feb 20 2007 md5.rb
Let's take a peek inside, shall we?
---snip--snip---
$ cat md5.rb
# just for compatibility; requiring "md5" is obsoleted
#
# $RoughId: md5.rb,v 1.4 2001/07/13 15:38:27 knu Exp $
# $Id: md5.rb 1609 2001-07-13 20:06:14Z knu $
require 'digest/md5'
MD5 = Digest::MD5
class MD5
def self.md5(*args)
new(*args)
end
end
---snip--snip---
Well, look at that. Here's what the real md5.rb does here:
8 -rw-r--r--@ 1 root wheel 431 Nov 24 2007 rubygems/digest/md5.rb
---snip--snip---
#!/usr/bin/env ruby
#--
# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others.
# All rights reserved.
# See LICENSE.txt for permissions.
#++
require 'digest/md5'
# :stopdoc:
module Gem
if RUBY_VERSION >= '1.8.6'
MD5 = Digest::MD5
else
require 'rubygems/digest/digest_adapter'
MD5 = DigestAdapter.new(Digest::MD5)
def MD5.md5(string)
self.hexdigest(string)
end
end
end
# :startdoc:
---snip--snip---
That MD5.md5 expects a string and calls MD5.hexdigest (instead of MD5.new). Looking still further, here's what '
self.new' ends up looking like (from rubygems/digest/digest_adapter):
def new
seld
end
No arguments, right? So when the old-and-weird md5.rb was calling new with *args, kaboom.
I have NO idea how that bogus md5.rb got there, or where it came from. But it's gone now and Adhearsion (and me) are happy.