ruby-changes:3388
From: ko1@a...
Date: 4 Jan 2008 16:26:34 +0900
Subject: [ruby-changes:3388] akr - Ruby:r14881 (trunk): * ext/digest/lib/digest/hmac.rb (Digest::HMAC#initialize): use
akr 2008-01-04 16:26:14 +0900 (Fri, 04 Jan 2008) New Revision: 14881 Modified files: trunk/ChangeLog trunk/ext/digest/lib/digest/hmac.rb Log: * ext/digest/lib/digest/hmac.rb (Digest::HMAC#initialize): use String#bytesize to avoid test errors on EUC-JP environment. http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ext/digest/lib/digest/hmac.rb?r1=14881&r2=14880&diff_format=u http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=14881&r2=14880&diff_format=u Index: ChangeLog =================================================================== --- ChangeLog (revision 14880) +++ ChangeLog (revision 14881) @@ -1,3 +1,8 @@ +Fri Jan 4 16:24:58 2008 Tanaka Akira <akr@f...> + + * ext/digest/lib/digest/hmac.rb (Digest::HMAC#initialize): use + String#bytesize to avoid test errors on EUC-JP environment. + Fri Jan 4 14:00:50 2008 Tanaka Akira <akr@f...> * re.c (rb_reg_prepare_re): check string encoding. Oniguruma doesn't Index: ext/digest/lib/digest/hmac.rb =================================================================== --- ext/digest/lib/digest/hmac.rb (revision 14880) +++ ext/digest/lib/digest/hmac.rb (revision 14881) @@ -45,7 +45,7 @@ block_len = @md.block_length - if key.length > block_len + if key.bytesize > block_len key = @md.digest(key) end -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml