[前][次][番号順一覧][スレッド一覧]

ruby-changes:10926

From: yugui <ko1@a...>
Date: Sun, 22 Feb 2009 13:30:49 +0900 (JST)
Subject: [ruby-changes:10926] Ruby:r22502 (ruby_1_9_1): merges r21996 from trunk into ruby_1_9_1.

yugui	2009-02-22 13:30:37 +0900 (Sun, 22 Feb 2009)

  New Revision: 22502

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=22502

  Log:
    merges r21996 from trunk into ruby_1_9_1.
    * lib/net/imap.rb (hmac_md5): should use String#ord to get ascii
      code from the one-character string.

  Modified files:
    branches/ruby_1_9_1/ChangeLog
    branches/ruby_1_9_1/lib/net/imap.rb

Index: ruby_1_9_1/ChangeLog
===================================================================
--- ruby_1_9_1/ChangeLog	(revision 22501)
+++ ruby_1_9_1/ChangeLog	(revision 22502)
@@ -1,3 +1,8 @@
+Tue Feb  3 12:09:08 2009  Shugo Maeda  <shugo@r...>
+
+	* lib/net/imap.rb (hmac_md5): should use String#ord to get ascii
+	  code from the one-character string.
+
 Mon Feb  2 17:05:55 2009  Nobuyoshi Nakada  <nobu@r...>
 
 	* file.c (rb_find_file_ext): should not be infected from other
Index: ruby_1_9_1/lib/net/imap.rb
===================================================================
--- ruby_1_9_1/lib/net/imap.rb	(revision 22501)
+++ ruby_1_9_1/lib/net/imap.rb	(revision 22502)
@@ -3151,8 +3151,8 @@
         k_ipad = key + "\0" * (64 - key.length)
         k_opad = key + "\0" * (64 - key.length)
         for i in 0..63
-          k_ipad[i] ^= 0x36
-          k_opad[i] ^= 0x5c
+          k_ipad[i] = (k_ipad[i].ord ^ 0x36).chr
+          k_opad[i] = (k_opad[i].ord ^ 0x5c).chr
         end
 
         digest = Digest::MD5.digest(k_ipad + text)

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]