#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>

int main(int argc, char* argv[]) {
  int extra_args = 2;
  int newargc = argc + extra_args;
  char** newargv = malloc(sizeof(char*) * (newargc+1));

  newargv[0] = argv[0];
  newargv[1] = "--disable=gem";
  newargv[2] = "-rdebian_ruby_standalone";
  newargv[newargc] = (char*)NULL;

  for (int i = 1; i < argc; i++) {
    newargv[i+extra_args] = argv[i];
  }

  execv(RUBY_BINARY, newargv);
}
