1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* lib/securerandom.rb: show actual read length in an error message.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35545 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2012-05-06 05:51:13 +00:00
parent ae4fa7951f
commit a961a8edf0
2 changed files with 5 additions and 1 deletions

View file

@ -1,3 +1,7 @@
Sun May 6 14:50:03 2012 Tanaka Akira <akr@fsij.org>
* lib/securerandom.rb: show actual read length in an error message.
Sat May 5 06:43:10 2012 Ryan Davis <ryand-ruby@zenspider.com>
* lib/minitest/*: Imported minitest 2.12.1 (r7323)

View file

@ -80,7 +80,7 @@ module SecureRandom
@has_urandom = true
ret = f.read(n)
if ret.length != n
raise NotImplementedError, "Unexpected partial read from random device"
raise NotImplementedError, "Unexpected partial read from random device: only #{ret.length} for #{n}"
end
return ret
}