diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-09 03:12:25 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-09 03:12:25 +0000 |
commit | 45fa4a4b634515ff9c7f1e8008990f0e7e8c46dc (patch) | |
tree | bad6a328f65bf6e7d1e7c634f7d893dab7c7d262 /string.c | |
parent | 0076f3b3f825b39e4629b29c6525864f68d9a855 (diff) | |
download | ruby-45fa4a4b634515ff9c7f1e8008990f0e7e8c46dc.tar.gz |
* string.c (tr_find): returns true if no characters to be removed is
specified.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14151 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'string.c')
-rw-r--r-- | string.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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; |