summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-10-15 15:15:45 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-10-15 15:15:45 +0000
commit7d80fb90ec405ba52fa9749721d0f8bcd08b070e (patch)
tree44db4dd66493151443c6375945cae62edb2ca0c2
parent08fa3c2e73cf7b361a5dbb826bf31b025e2820a0 (diff)
downloadruby-7d80fb90ec405ba52fa9749721d0f8bcd08b070e.tar.gz
ruby-7d80fb90ec405ba52fa9749721d0f8bcd08b070e.tar.xz
ruby-7d80fb90ec405ba52fa9749721d0f8bcd08b070e.zip
* parse.y (yylex): disallow alpha-numeric and mbchar for
terminator of %string. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@1785 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--parse.y4
2 files changed, 9 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 8a7384436..f73d193e7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Tue Oct 16 00:07:06 2001 Nobuyoshi Nakada <nobu.nakada@nifty.ne.jp>
+
+ * parse.y (yylex): disallow alpha-numeric and mbchar for
+ terminator of %string.
+
Wed Oct 10 03:11:47 2001 Yukihiro Matsumoto <matz@ruby-lang.org>
* file.c (rb_stat_clone): should copy internal data too.
diff --git a/parse.y b/parse.y
index d7ed5b5f5..b1147fc97 100644
--- a/parse.y
+++ b/parse.y
@@ -3528,6 +3528,10 @@ yylex()
}
else {
term = nextc();
+ if (ISALNUM(term) || ismbchar(term)) {
+ yyerror("unknown type of %string");
+ return 0;
+ }
}
if (c == -1 || term == -1) {
rb_compile_error("unterminated quoted string meets end of file");