summaryrefslogtreecommitdiff
path: root/ext/digest/lib/digest/hmac.rb
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
commit386e2d94d86428560b85a01ae9bd128f12cef229 (patch)
tree92b3eb442534cc10a8ca261ba03b6d9c435526ab /ext/digest/lib/digest/hmac.rb
parentf780cdec75b5f09a7afbd9b45fad1f0d709fe946 (diff)
* ext/digest/lib/digest/hmac.rb (Digest::HMAC#initialize): use
String#bytesize to avoid test errors on EUC-JP environment. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14881 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/digest/lib/digest/hmac.rb')
-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 cdd537689c..0e3068b0c0 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