1
0
Fork 0
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:
eregon 2012-08-01 13:30:51 +00:00
parent f52eefece1
commit 61b624d149
4 changed files with 18 additions and 4 deletions

View file

@ -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