* parse.y (rb_intern): should handle multibyte name.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3890 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
38df1a90cc
commit
e13e58bef6
@ -1,3 +1,7 @@
|
|||||||
|
Sat May 31 04:36:54 2003 Nobuyoshi Nakada <nobu.nokada@softhome.net>
|
||||||
|
|
||||||
|
* parse.y (rb_intern): should handle multibyte name.
|
||||||
|
|
||||||
Fri May 30 23:18:01 2003 why the lucky stiff <ruby-cvs@whytheluckystiff.net>
|
Fri May 30 23:18:01 2003 why the lucky stiff <ruby-cvs@whytheluckystiff.net>
|
||||||
|
|
||||||
* ext/syck/rubyext.c (rb_syck_mktime): seconds calculated wrong.
|
* ext/syck/rubyext.c (rb_syck_mktime): seconds calculated wrong.
|
||||||
|
4
parse.y
4
parse.y
@ -5781,6 +5781,7 @@ rb_intern(name)
|
|||||||
if (st_lookup(sym_tbl, (st_data_t)name, (st_data_t *)&id))
|
if (st_lookup(sym_tbl, (st_data_t)name, (st_data_t *)&id))
|
||||||
return id;
|
return id;
|
||||||
|
|
||||||
|
last = strlen(name)-1;
|
||||||
id = 0;
|
id = 0;
|
||||||
switch (*name) {
|
switch (*name) {
|
||||||
case '$':
|
case '$':
|
||||||
@ -5812,7 +5813,6 @@ rb_intern(name)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
last = strlen(name)-1;
|
|
||||||
if (name[last] == '=') {
|
if (name[last] == '=') {
|
||||||
/* attribute assignment */
|
/* attribute assignment */
|
||||||
char *buf = ALLOCA_N(char,last+1);
|
char *buf = ALLOCA_N(char,last+1);
|
||||||
@ -5835,7 +5835,7 @@ rb_intern(name)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
while (*m && is_identchar(*m)) {
|
while (*m && is_identchar(*m)) {
|
||||||
m++;
|
m += mblen(m, name + last - m + 1);
|
||||||
}
|
}
|
||||||
if (*m) id = ID_JUNK;
|
if (*m) id = ID_JUNK;
|
||||||
id |= ++last_id << ID_SCOPE_SHIFT;
|
id |= ++last_id << ID_SCOPE_SHIFT;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user