diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2007-02-22 11:00:06 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2007-02-22 11:00:06 +0000 |
commit | f2fb7111524835946913d8335acc7a6930991c9a (patch) | |
tree | f64e7ee7de0b9c3f5b7796800effeebd4011295c | |
parent | 236fe10fe9fd2ee3138784bf0cd5e4248c6b5d5e (diff) | |
download | rails-f2fb7111524835946913d8335acc7a6930991c9a.tar.gz rails-f2fb7111524835946913d8335acc7a6930991c9a.tar.bz2 rails-f2fb7111524835946913d8335acc7a6930991c9a.zip |
Ruby 1.8.6 compatibility.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6204 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
-rw-r--r-- | activerecord/lib/active_record/vendor/mysql.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/activerecord/lib/active_record/vendor/mysql.rb b/activerecord/lib/active_record/vendor/mysql.rb index 0d8cc2efd8..85ded2bc94 100644 --- a/activerecord/lib/active_record/vendor/mysql.rb +++ b/activerecord/lib/active_record/vendor/mysql.rb @@ -563,9 +563,9 @@ class Mysql def scramble41(password, message) return 0x00.chr if password.nil? or password.empty? buf = [0x14] - s1 = Digest::SHA1.new(password).digest - s2 = Digest::SHA1.new(s1).digest - x = Digest::SHA1.new(message + s2).digest + s1 = Digest::SHA1.digest(password) + s2 = Digest::SHA1.digest(s1) + x = Digest::SHA1.digest(message + s2) (0..s1.length - 1).each {|i| buf.push(s1[i] ^ x[i])} buf.pack("C*") end |