summaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
Diffstat (limited to 'string.c')
-rw-r--r--string.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/string.c b/string.c
index 8ed34edfd8..b716c16b15 100644
--- a/string.c
+++ b/string.c
@@ -3674,8 +3674,8 @@ tr_find(int c, char table[256], VALUE del, VALUE nodel)
else {
VALUE v = INT2NUM(c);
- if ((del && !NIL_P(rb_hash_aref(del, v))) &&
- (!nodel || NIL_P(rb_hash_aref(nodel, v)))) {
+ if ((!del || !NIL_P(rb_hash_lookup(del, v))) &&
+ (!nodel || NIL_P(rb_hash_lookup(nodel, v)))) {
return Qtrue;
}
return Qfalse;