Skip to content

Instantly share code, notes, and snippets.

@flyerhzm
Forked from bovi/ruby-growl at ruby 1.9.2
Created February 10, 2010 09:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save flyerhzm/300184 to your computer and use it in GitHub Desktop.
Save flyerhzm/300184 to your computer and use it in GitHub Desktop.
--- ruby18-growl.rb 2005-11-14 21:15:15.000000000 -0800
+++ ruby-growl.rb 2009-11-22 00:47:06.000000000 -0800
@@ -2,7 +2,7 @@
$TESTING = false unless defined? $TESTING
-require 'md5'
+require 'digest/md5'
require 'socket'
##
@@ -227,7 +227,7 @@
packet = packet.pack GNR_FORMAT
- checksum = MD5.new packet
+ checksum = Digest::MD5.new.update packet
checksum.update @password unless @password.nil?
packet << checksum.digest
@@ -265,7 +265,7 @@
packet << data.join
packet = packet.pack GNN_FORMAT
- checksum = MD5.new packet
+ checksum = Digest::MD5.new.update packet
checksum.update @password unless @password.nil?
packet << checksum.digest
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment