From: Michael Neumann Date: 2001-08-25T18:45:31+09:00 Subject: [ruby-talk:20358] Re: Digest::MD5 usage... Sean Chittenden wrote: > Howdy. The following script works: > > require 'digest/md5' > md5digest = Digest::MD5.new > md5digest.update('foo') > puts md5digest.hexdigest Digest is new in Ruby 1.7. > > However, the following does something interesting: > > require 'digest/md5' > md5digest = Digest::MD5.hexdigest('foo') > > Why does the class method of Digest::MD5 print the digest to > STDOUT? Maybe it's me, but that strikes me as an odd behavior. Is this > the intended behavior? Is there any module documentation sitting around > someplace? -sc Because file ext/digest/digest.c, method rb_digest_base_s_hexdigest has a line "puts(hexdigest)". Perhaps this should be removed? Regards, Michael -- Michael Neumann merlin.zwo InfoDesign GmbH http://www.merlin-zwo.de