Sha256: ea4192fa5f6ebaf47b4153f5790f1759b49aeb53ebc1cff3cf59cb1f54dbc156
Contents?: true
Size: 700 Bytes
Versions: 25
Compression:
Stored size: 700 Bytes
Contents
require 'ruby2js' require 'set' # Experimental secure random support module Ruby2JS module Filter module SecureRandom include SEXP extend SEXP IMPORT_BASE62_RANDOM = s(:import, ['base62-random'], s(:attr, nil, :base62_random)) def on_send(node) target, method, *args = node.children if target == s(:const, nil, :SecureRandom) if method == :alphanumeric and args.length == 1 prepend_list << IMPORT_BASE62_RANDOM node.updated(nil, [nil, :base62_random, *args]) else super end else super end end end DEFAULTS.push SecureRandom end end
Version data entries
25 entries across 25 versions & 1 rubygems