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

* trunk/parse.y (rb_enc_symname2_p): support "!", "!=" and "!~".

[ruby-dev:33592]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15373 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2008-02-04 05:51:21 +00:00
parent 00f34f9274
commit d739fc5a77
2 changed files with 14 additions and 1 deletions

View file

@ -1,3 +1,8 @@
Mon Feb 4 14:51:19 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
* trunk/parse.y (rb_enc_symname2_p): support "!", "!=" and "!~".
[ruby-dev:33592]
Mon Feb 4 13:58:42 2008 NAKAMURA Usaku <usa@ruby-lang.org>
* lib/delegate.rb (Delegator.preserved, DelegateClass.methods): extend

10
parse.y
View file

@ -8906,11 +8906,19 @@ rb_enc_symname2_p(const char *name, int len, rb_encoding *enc)
if (*++m == '=') ++m;
break;
case '!':
switch (*++m) {
case '\0': return Qtrue;
case '=': case '~': ++m; break;
default: return Qfalse;
}
break;
default:
localid = !rb_enc_isupper(*m, enc);
id:
if (m >= e || (*m != '_' && !rb_enc_isalpha(*m, enc) && ISASCII(*m)))
return Qfalse;
return Qfalse;
while (m < e && is_identchar(m, e, enc)) m += rb_enc_mbclen(m, e, enc);
if (localid) {
switch (*m) {