jruby
https://github.com/jruby/jruby
Ruby
JRuby, an implementation of Ruby on the JVM
Random::Formatter#alphanumeric
SecureRandom.alphanumeric generates a random alphanumeric string. The argument _n_ specifies the length, in characters, of the alphanumeric string to be generated. If _n_ is not specified or is nil, 16 is assumed. It may be larger in the future. The result may contain A-Z, a-z and 0-9. p SecureRandom.alphanumeric #=> "2BuBuLf3WfSKyQbR" p SecureRandom.alphanumeric(10) #=> "i6K93NdqiH" If a secure random number generator is not available, +NotImplementedError+ is raised.
Edit
git clone [email protected]:jruby/jruby.git
cd jruby
open lib/ruby/stdlib/securerandom.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-Random--Formatter-alphanumeric-for-pr
# Commit to gitgit add lib/ruby/stdlib/securerandom.rbgit commit -m "better docs for Random::Formatter#alphanumeric"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-Random--Formatter-alphanumeric-for-pr
hub pull-request
# Celebrate!