summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-05-06 05:51:13 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-05-06 05:51:13 +0000
commita961a8edf04c81a22686728d59f2cba0f1fc481e (patch)
tree9f83acf100f673593f71b4e4e8cb7b4df7982cec /lib
parentae4fa7951fde1844a11dae3a2c15d10a5fa99f03 (diff)
* 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
Diffstat (limited to 'lib')
-rw-r--r--lib/securerandom.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/securerandom.rb b/lib/securerandom.rb
index eede2fef04..a12e92fc7a 100644
--- a/lib/securerandom.rb
+++ b/lib/securerandom.rb
@@ -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
}