summaryrefslogtreecommitdiff
path: root/hash.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1998-05-13 07:26:47 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1998-05-13 07:26:47 +0000
commitae2fe781dd4aae16a2f03a4b9fb93514eb9886d4 (patch)
treebc7b2f6399af854b2b7e3515916c5f51d970bf57 /hash.c
parentad592443af373c3bbe61b41df106734856ad3072 (diff)
1.1b9_19
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/v1_1r@209 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'hash.c')
-rw-r--r--hash.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/hash.c b/hash.c
index 3ce2aae..ab84569 100644
--- a/hash.c
+++ b/hash.c
@@ -156,7 +156,7 @@ hash_delete_nil(key, value)
return ST_CONTINUE;
}
-static void
+static VALUE
hash_foreach_ensure(hash)
VALUE hash;
{
@@ -774,6 +774,8 @@ hash_update(hash1, hash2)
return hash1;
}
+#ifndef __MACOS__ /* environment variables nothing on MacOS. */
+
int env_path_tainted();
static int path_tainted = -1;
@@ -1131,6 +1133,8 @@ env_to_hash(obj)
return hash;
}
+#endif /* ifndef __MACOS__ environment variables nothing on MacOS. */
+
void
Init_Hash()
{
@@ -1188,6 +1192,7 @@ Init_Hash()
rb_define_method(cHash,"key?", hash_has_key, 1);
rb_define_method(cHash,"value?", hash_has_value, 1);
+#ifndef __MACOS__ /* environment variables nothing on MacOS. */
envtbl = obj_alloc(cObject);
rb_extend_object(envtbl, mEnumerable);
@@ -1216,4 +1221,8 @@ Init_Hash()
rb_define_singleton_method(envtbl,"to_hash", env_to_hash, 0);
rb_define_global_const("ENV", envtbl);
+#else /* __MACOS__ */
+ envtbl = hash_s_new(0, NULL, cHash);
+ rb_define_global_const("ENV", envtbl);
+#endif /* ifndef __MACOS__ environment variables nothing on MacOS. */
}