using the instance_eval method instead of the send method for
Ruby-1.9.3 compatibility by @doxo
fixed bug in random string generator