aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-05-10 05:57:11 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-05-10 05:57:11 +0000
commited71054e1667311d60c409369c66ea0704ad7dff (patch)
treedadead0ea1a5a4b8e5febef318f9b1b3e60f77c8 /lib
parent5aac5ee94b9785640964d6c948e8db2d3d0d2607 (diff)
downloadruby-ed71054e1667311d60c409369c66ea0704ad7dff.tar.gz
random.c: use bytes
* random.c (obj_random_bytes): base on bytes method instead of rand method, not to call toplevel rand method. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54968 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/securerandom.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/securerandom.rb b/lib/securerandom.rb
index d8afc7d01b..9201c9337a 100644
--- a/lib/securerandom.rb
+++ b/lib/securerandom.rb
@@ -75,6 +75,10 @@ module SecureRandom
ret
end
end
+
+ class << self
+ alias bytes gen_random
+ end
end
module Random::Formatter