зеркало из https://github.com/github/ruby.git
* 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:
Родитель
ae4fa7951f
Коммит
a961a8edf0
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче