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

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

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

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

  execv("/usr/bin/ruby", newargv);
}
