diff --git a/hash.c b/hash.c index d6ac93fbc7..56cedf072b 100644 --- a/hash.c +++ b/hash.c @@ -2547,14 +2547,16 @@ env_str_new2(const char *ptr) rb_raise(rb_eArgError, "bad environment variable " #var) : (void)0) static inline const char * -env_name(VALUE s) +env_name(volatile VALUE *s) { const char *name; - SafeStringValue(s); - get_env_ptr(name, s); + SafeStringValue(*s); + get_env_ptr(name, *s); return name; } +#define env_name(s) env_name(&(s)) + static VALUE env_delete(VALUE obj, VALUE name) {