Issue #1679 has been updated by Jarek Jurasz.


It does not know about SetEnvironmentVariable() in ruby_setenv() / hash.c.
GetEnvironmentVariable() needs some memory management.
The following leaky version passes the test.

char *
rb_w32_getenv(const char *name)
{
  char env[1024];
  unsigned len = GetEnvironmentVariable(name, env, sizeof(env));
  if (! len) {
    map_errno(GetLastError());
    return NULL;
  }
  /* Memory leak */
  return strdup(env);
}
----------------------------------------
http://redmine.ruby-lang.org/issues/show/1679

----------------------------------------
http://redmine.ruby-lang.org