1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* parse.y (parser_read_escape): disallow control and meta modifiers

for non-ASCII characters.  [ruby-core:13685]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13962 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2007-11-18 16:53:12 +00:00
parent 30e97cbb8b
commit 9417595993
3 changed files with 10 additions and 5 deletions

View file

@ -1,3 +1,8 @@
Mon Nov 19 01:53:11 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
* parse.y (parser_read_escape): disallow control and meta modifiers
for non-ASCII characters. [ruby-core:13685]
Sun Nov 18 20:47:41 2007 Tanaka Akira <akr@fsij.org>
* marshal.c (mark_dump_arg): it may be called after dump_ensure.

View file

@ -5140,7 +5140,7 @@ parser_read_escape(struct parser_params *parser, int flags,
*has8bit = 1;
return read_escape(flags|ESCAPE_META, &tmp, &tmp, encp) | 0x80;
}
else if (c == -1) goto eof;
else if (c == -1 || !ISASCII(c)) goto eof;
else {
*has8bit = 1;
return ((c & 0xff) | 0x80);
@ -5159,7 +5159,7 @@ parser_read_escape(struct parser_params *parser, int flags,
}
else if (c == '?')
return 0177;
else if (c == -1) goto eof;
else if (c == -1 || !ISASCII(c)) goto eof;
return c & 0x9f;
eof:

View file

@ -1,7 +1,7 @@
#define RUBY_VERSION "1.9.0"
#define RUBY_RELEASE_DATE "2007-11-18"
#define RUBY_RELEASE_DATE "2007-11-19"
#define RUBY_VERSION_CODE 190
#define RUBY_RELEASE_CODE 20071118
#define RUBY_RELEASE_CODE 20071119
#define RUBY_PATCHLEVEL 0
#define RUBY_VERSION_MAJOR 1
@ -9,7 +9,7 @@
#define RUBY_VERSION_TEENY 0
#define RUBY_RELEASE_YEAR 2007
#define RUBY_RELEASE_MONTH 11
#define RUBY_RELEASE_DAY 18
#define RUBY_RELEASE_DAY 19
#ifdef RUBY_EXTERN
RUBY_EXTERN const char ruby_version[];