I'm still trying to understand the security mechanism of ruby.

 Why there is a difference between eval and module_eval ?

 Apparently eval is protected with (from rb_f_eval) :

    if (ruby_safe_level >= 4) {
	Check_Type(src, T_STRING);
    }
    else {
	Check_SafeStr(src);
    }

 and module_eval with (from eval_under) :

    Check_SafeStr(src);


Guy Decoux