diff --git a/ChangeLog b/ChangeLog index 965906200a..a55f39d53c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Sun May 6 14:50:03 2012 Tanaka Akira + + * lib/securerandom.rb: show actual read length in an error message. + Sat May 5 06:43:10 2012 Ryan Davis * lib/minitest/*: Imported minitest 2.12.1 (r7323) 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 }