summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog14
-rw-r--r--lex.c1
-rw-r--r--lib/pstore.rb3
-rw-r--r--parse.y14
4 files changed, 23 insertions, 9 deletions
diff --git a/ChangeLog b/ChangeLog
index ecbe348b10..8fa25cbf33 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -23,6 +23,11 @@ Sun Jun 23 00:19:10 2002 Tadayoshi Funaba <tadf@dotrb.org>
* lib/date.rb, lib/date/format.rb, sample/cal.rb, sample/goodfriday.rb:
updated to the new version (based on date2 3.3).
+Fri Jun 21 18:49:58 2002 Yukihiro Matsumoto <matz@ruby-lang.org>
+
+ * parse.y (yylex): __END__ should not be effective within
+ string literals.
+
Thu Jun 20 21:09:37 2002 Nobuyoshi Nakada <nobu.nokada@softhome.net>
* ext/readline/readline.c (readline_readline): get rid of
@@ -42,6 +47,11 @@ Wed Jun 19 14:46:18 2002 WATANABE Hirofumi <eban@ruby-lang.org>
* ext/extmk.rb, lib/mkmf.rb (xsystem): open the log file if xsystem
is called.
+Wed Jun 19 01:01:13 2002 Yukihiro Matsumoto <matz@ruby-lang.org>
+
+ * parse.y (here_document): should be aware of __END__ within here
+ documents.
+
Wed Jun 19 00:50:50 2002 Nobuyoshi Nakada <nobu.nokada@softhome.net>
* parse.y (yylex): ? followed by successive word charaters is
@@ -64,6 +74,10 @@ Tue Jun 18 12:50:17 2002 Nobuyoshi Nakada <nobu.nokada@softhome.net>
* parse.y (logop): ditto.
+Mon Jun 17 11:11:34 2002 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
+
+ * string.c (rb_str_crypt): result need not be tainted always.
+
Mon Jun 17 10:51:37 2002 Nobuyoshi Nakada <nobu.nokada@softhome.net>
* dln.c (dln_load): need to preserve dln_strerror() result,
diff --git a/lex.c b/lex.c
index 979246f047..67f1337987 100644
--- a/lex.c
+++ b/lex.c
@@ -65,7 +65,6 @@ hash (str, len)
return hval + asso_values[(unsigned char)str[len - 1]];
}
-static
#ifdef __GNUC__
__inline
#endif
diff --git a/lib/pstore.rb b/lib/pstore.rb
index 4a3434b283..23b2d878a3 100644
--- a/lib/pstore.rb
+++ b/lib/pstore.rb
@@ -95,8 +95,7 @@ class PStore
file.flock(read_only ? File::LOCK_SH : File::LOCK_EX)
if read_only
@table = Marshal::load(file)
- elsif orig
- content = file.read
+ elsif orig and (content = file.read) != nil
@table = Marshal::load(content)
size = content.size
md5 = Digest::MD5.digest(content)
diff --git a/parse.y b/parse.y
index 9708cac213..60c54a1500 100644
--- a/parse.y
+++ b/parse.y
@@ -1778,6 +1778,7 @@ strings : string
}
$$ = node;
}
+ ;
string : string1
| string string1
@@ -2445,12 +2446,6 @@ nextc()
ruby_sourceline++;
lex_pbeg = lex_p = RSTRING(v)->ptr;
lex_pend = lex_p + RSTRING(v)->len;
- if (!lex_strterm && strncmp(lex_pbeg, "__END__", 7) == 0 &&
- (RSTRING(v)->len == 7 || lex_pbeg[7] == '\n' || lex_pbeg[7] == '\r')) {
- ruby__end__seen = 1;
- lex_lastline = 0;
- return -1;
- }
lex_lastline = v;
}
else {
@@ -4182,6 +4177,13 @@ yylex()
}
}
tokfix();
+ if (strcmp(tok(), "__END__") == 0 &&
+ lex_p - lex_pbeg == 7 &&
+ (lex_pend == lex_p || *lex_p == '\n' || *lex_p == '\r')) {
+ ruby__end__seen = 1;
+ lex_lastline = 0;
+ return -1;
+ }
last_id = yylval.id = rb_intern(tok());
return result;
}