bytes(p1)
Returns a random binary string containing size bytes.
random_string = Random.new.bytes(10) # => "\xD7:R\xAB?\x83\xCE\xFAkO" random_string.size # => 10
static VALUE random_bytes(VALUE obj, VALUE len) { return rb_random_bytes(obj, NUM2LONG(rb_to_int(len))); }