require "securerandom" module SecureRandom F = File.open("/dev/urandom") def self.random_bytes(n = nil) F.read(n || 16) end end
def f(n = 16) n end p f # => 16 p f(nil) # => nil