summaryrefslogtreecommitdiff
path: root/hash.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1999-08-06 06:48:25 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1999-08-06 06:48:25 +0000
commit88b8c7e3ffdbc0116c31b8e9691743567d6e3e34 (patch)
treef3f7b20606f3531ad43c3a75708c4dcf1c37bfee /hash.c
parentb516f1f25458c78974ff7dc5488b8dfaae997fae (diff)
990806
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_3@509 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'hash.c')
-rw-r--r--hash.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/hash.c b/hash.c
index 68e90fe..608f85d 100644
--- a/hash.c
+++ b/hash.c
@@ -68,6 +68,13 @@ rb_hash(obj)
return rb_funcall(obj, hash, 0);
}
+static VALUE
+eql(args)
+ VALUE *args;
+{
+ return (VALUE)rb_eql(args[0], args[1]);
+}
+
static int
rb_any_cmp(a, b)
VALUE a, b;
@@ -78,11 +85,13 @@ rb_any_cmp(a, b)
else if (TYPE(a) == T_STRING) {
if (TYPE(b) == T_STRING) return rb_str_cmp(a, b);
}
+ else {
+ VALUE args[2];
- DEFER_INTS;
- a = !rb_eql(a, b);
- ENABLE_INTS;
- return a;
+ args[0] = a;
+ args[1] = b;
+ return !rb_with_disable_interrupt(eql, (VALUE)args);
+ }
}
static int
@@ -944,7 +953,7 @@ rb_path_check(path)
char *path;
{
char *p, *pend;
- const char sep = RUBY_PATH_SEP[0];
+ const char sep = PATH_SEP_CHAR;
if (!path) return 1;