summaryrefslogtreecommitdiffstats
path: root/ext/digest/lib
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-01-04 07:26:14 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-01-04 07:26:14 +0000
commit768afa284479d7d586263d58273355c58aee224d (patch)
tree92b3eb442534cc10a8ca261ba03b6d9c435526ab /ext/digest/lib
parent5ad3d60d896ff0a7239272b1f4f1e149b534ba79 (diff)
downloadruby-768afa284479d7d586263d58273355c58aee224d.tar.gz
ruby-768afa284479d7d586263d58273355c58aee224d.tar.xz
ruby-768afa284479d7d586263d58273355c58aee224d.zip
* ext/digest/lib/digest/hmac.rb (Digest::HMAC#initialize): use
String#bytesize to avoid test errors on EUC-JP environment. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@14881 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/digest/lib')
-rw-r--r--ext/digest/lib/digest/hmac.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/digest/lib/digest/hmac.rb b/ext/digest/lib/digest/hmac.rb
index cdd537689..0e3068b0c 100644
--- a/ext/digest/lib/digest/hmac.rb
+++ b/ext/digest/lib/digest/hmac.rb
@@ -45,7 +45,7 @@ module Digest
block_len = @md.block_length
- if key.length > block_len
+ if key.bytesize > block_len
key = @md.digest(key)
end