diff options
| author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-03-04 07:04:11 +0000 |
|---|---|---|
| committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-03-04 07:04:11 +0000 |
| commit | d1d578775b2d8eeab28fab3375113280d720c204 (patch) | |
| tree | 5ae16bdd5c133719946c2b4ba4db6784f845187e /hash.c | |
| parent | e2ecfc1416f7166aa71a796f3632576cac136919 (diff) | |
| download | ruby-d1d578775b2d8eeab28fab3375113280d720c204.tar.gz ruby-d1d578775b2d8eeab28fab3375113280d720c204.tar.xz ruby-d1d578775b2d8eeab28fab3375113280d720c204.zip | |
* io.c (rb_io_popen): do not call rb_io_close() directly, call
"close" method instead. [ruby-dev:19717]
* io.c (rb_io_s_open): ditto.
* hash.c (rb_any_hash): remove DEFER_INTS. all do_hash() calls in
st.c are at the top of functions. No reentrant problem.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3551 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'hash.c')
| -rw-r--r-- | hash.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -65,6 +65,8 @@ rb_any_cmp(a, b) VALUE a, b; { VALUE args[2]; + + if (a == b) return 0; if (FIXNUM_P(a) && FIXNUM_P(b)) { return a != b; } @@ -72,10 +74,10 @@ rb_any_cmp(a, b) TYPE(b) == T_STRING && RBASIC(b)->klass == rb_cString) { return rb_str_cmp(a, b); } + if (a == Qundef || b == Qundef) return -1; if (SYMBOL_P(a) && SYMBOL_P(b)) { return a != b; } - if (a == Qundef || b == Qundef) return -1; args[0] = a; args[1] = b; @@ -99,12 +101,10 @@ rb_any_hash(a) break; default: - DEFER_INTS; hval = rb_funcall(a, id_hash, 0); if (!FIXNUM_P(hval)) { hval = rb_funcall(hval, '%', 1, INT2FIX(536870923)); } - ENABLE_INTS; return (int)FIX2LONG(hval); } } |
