/*
 * call-seq:
 *   iseq.dump(limit) => String
 *
 * Dumps VM::InstuctionSequence to a string (only available on YARV).
 */
static VALUE iseq_marshal_dump(VALUE self, VALUE limit)
{
  VALUE arr;

  if(ruby_safe_level >= 4)
  {
    /* no access to potentially sensitive data from the sandbox */
    rb_raise(rb_eSecurityError, "Insecure: can't dump iseq");
  }

  arr = iseq_data_to_ary((rb_iseq_t *)DATA_PTR(self));
  convert_modules_to_placeholders(arr);

  return marshal_dump(arr, limit);
}