mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
ext/digest/digest.c (hexencode_str_new): return an ASCII string
* test/digest: tests for all kind of digests encodings [ruby-core:46792][Bug #6799] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36588 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
f52eefece1
commit
61b624d149
4 changed files with 18 additions and 4 deletions
|
@ -49,6 +49,7 @@ class TestDigestExtend < Test::Unit::TestCase
|
|||
(0..0xff).to_a.map { |c| sprintf("%02x", c ) }.join(''),
|
||||
Digest.hexencode((0..0xff).to_a.map { |c| c.chr }.join(''))
|
||||
)
|
||||
assert_equal(Encoding::US_ASCII, Digest.hexencode("\1\2").encoding)
|
||||
end
|
||||
|
||||
def test_class_reset
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue