diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-03-12 09:28:50 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-03-12 09:28:50 +0000 |
commit | 43b18e733d836df19b106786d0025f604542e74a (patch) | |
tree | 112f4a6b760190c822c6771f77727436cb87fd7a /parse.y | |
parent | 230034b7ab4abe17df4e0804531c7279c55bbc7b (diff) | |
download | ruby-43b18e733d836df19b106786d0025f604542e74a.tar.gz |
* regex.c (re_compile_pattern): '\0111' should be '\011' plus '1',
since octal literals are formed by three digits at most.
* marshal.c (w_object): module inclusion using extend() should
also be detected.
* eval.c (rb_eval_cmd): cbase should not be NULL; it should be
either ruby_wrapper or Object.
* enum.c (enum_each_with_index): should return self.
* process.c (proc_setpgrp): should return value for non-void function.
* process.c (proc_getpgid): should raise exception if getpgid() return -1.
* string.c (rb_str_ljust): should return a duplicated string.
* string.c (rb_str_rjust): ditto.
* string.c (rb_str_center): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2187 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r-- | parse.y | 15 |
1 files changed, 3 insertions, 12 deletions
@@ -2324,20 +2324,11 @@ read_escape() case '0': case '1': case '2': case '3': /* octal constant */ case '4': case '5': case '6': case '7': { - char buf[3]; - int i; + int numlen; pushback(c); - for (i=0; i<3; i++) { - c = nextc(); - if (c == -1) goto eof; - if (c < '0' || '7' < c) { - pushback(c); - break; - } - buf[i] = c; - } - c = scan_oct(buf, i, &i); + c = scan_oct(lex_p, 3, &numlen); + lex_p += numlen; } return c; |