aboutsummaryrefslogtreecommitdiffstats
path: root/string.c
diff options
context:
space:
mode:
Diffstat (limited to 'string.c')
-rw-r--r--string.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/string.c b/string.c
index 7fd09d0b3a..67f1e33b17 100644
--- a/string.c
+++ b/string.c
@@ -4530,12 +4530,12 @@ tr_find(int c, char table[256], VALUE del, VALUE nodel)
else {
VALUE v = INT2NUM(c);
- if (!del || NIL_P(rb_hash_lookup(del, v))) {
- return Qfalse;
+ if (del && !NIL_P(rb_hash_lookup(del, v))) {
+ if (!nodel || NIL_P(rb_hash_lookup(nodel, v))) {
+ return Qtrue;
+ }
}
- if (nodel && NIL_P(rb_hash_lookup(nodel, v)))
- return Qfalse;
- return Qtrue;
+ return Qfalse;
}
}