diff --git a/ChangeLog b/ChangeLog index edc9780723..41b9052c05 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Fri Jan 4 16:24:58 2008 Tanaka Akira + + * 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 * re.c (rb_reg_prepare_re): check string encoding. Oniguruma doesn't 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