summaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
authorYukihiro Matsumoto <matz@ruby-lang.org>1997-12-09 17:54:56 +0900
committerTakashi Kokubun <takashikkbn@gmail.com>2019-08-17 22:09:33 +0900
commit66541bbb3630a5c512f8012c52ae777ab83beba5 (patch)
treebe1431b56b485de6cb1da065bb2161551872820d /string.c
parentfb0fe24512d1796f794306768ddac37566e9a209 (diff)
version 1.0-971209v1_0_971209
https://cache.ruby-lang.org/pub/ruby/1.0/ruby-1.0-971209.tar.gz Tue Dec 9 17:54:56 1997 Yukihiro Matsumoto <matz@netlab.co.jp> * version 1.0-971209 * sample/ruby-mode.el (ruby-expr-beg): forgot to handle modifiers. * parse.y (tokadd): token buffer overrun.
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 7f1fae7..b9025cc 100644
--- a/string.c
+++ b/string.c
@@ -1609,7 +1609,7 @@ tr_squeeze(str1, str2)
UCHAR *s, *send, *t;
char c, save;
- if (str2) {
+ if (!NIL_P(str2)) {
tr_setup_table(str2, squeez);
}
else {
@@ -1646,7 +1646,7 @@ str_squeeze_bang(argc, argv, str1)
VALUE str2;
rb_scan_args(argc, argv, "01", &str2);
- if (str2) {
+ if (!NIL_P(str2)) {
Check_Type(str2, T_STRING);
}
return tr_squeeze(str1, str2);