* parse.y (rb_intern2): use rb_intern2 to intern without trailing
equal sign. * parse.y (rb_intern2, ripper_id2sym): fixed indent. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12575 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
362c3c0e5d
commit
9a7a11564c
@ -1,3 +1,10 @@
|
|||||||
|
Wed Jun 20 04:45:39 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* parse.y (rb_intern2): use rb_intern2 to intern without trailing
|
||||||
|
equal sign.
|
||||||
|
|
||||||
|
* parse.y (rb_intern2, ripper_id2sym): fixed indent.
|
||||||
|
|
||||||
Tue Jun 19 10:55:05 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Tue Jun 19 10:55:05 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* eval_load.c (load_ext, rb_require_safe): pass VALUE instead of
|
* eval_load.c (load_ext, rb_require_safe): pass VALUE instead of
|
||||||
|
18
parse.y
18
parse.y
@ -8461,11 +8461,7 @@ rb_intern2(const char *name, long len)
|
|||||||
|
|
||||||
if (name[last] == '=') {
|
if (name[last] == '=') {
|
||||||
/* attribute assignment */
|
/* attribute assignment */
|
||||||
char *buf = ALLOCA_N(char,last+1);
|
id = rb_intern2(name, last);
|
||||||
|
|
||||||
strncpy(buf, name, last);
|
|
||||||
buf[last] = '\0';
|
|
||||||
id = rb_intern(buf);
|
|
||||||
if (id > tLAST_TOKEN && !is_attrset_id(id)) {
|
if (id > tLAST_TOKEN && !is_attrset_id(id)) {
|
||||||
id = rb_id_attrset(id);
|
id = rb_id_attrset(id);
|
||||||
goto id_register;
|
goto id_register;
|
||||||
@ -8481,9 +8477,9 @@ rb_intern2(const char *name, long len)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (!ISDIGIT(*m)) {
|
if (!ISDIGIT(*m)) {
|
||||||
while (m <= name + last && is_identchar(*m)) {
|
while (m <= name + last && is_identchar(*m)) {
|
||||||
m += mbclen(*m);
|
m += mbclen(*m);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (*m) id = ID_JUNK;
|
if (*m) id = ID_JUNK;
|
||||||
new_id:
|
new_id:
|
||||||
@ -8976,13 +8972,13 @@ ripper_id2sym(ID id)
|
|||||||
return ID2SYM(rb_intern(name));
|
return ID2SYM(rb_intern(name));
|
||||||
}
|
}
|
||||||
switch (id) {
|
switch (id) {
|
||||||
case tOROP:
|
case tOROP:
|
||||||
name = "||";
|
name = "||";
|
||||||
break;
|
break;
|
||||||
case tANDOP:
|
case tANDOP:
|
||||||
name = "&&";
|
name = "&&";
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
name = rb_id2name(id);
|
name = rb_id2name(id);
|
||||||
if (!name) {
|
if (!name) {
|
||||||
rb_bug("cannot convert ID to string: %ld", (unsigned long)id);
|
rb_bug("cannot convert ID to string: %ld", (unsigned long)id);
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#define RUBY_VERSION "1.9.0"
|
#define RUBY_VERSION "1.9.0"
|
||||||
#define RUBY_RELEASE_DATE "2007-06-19"
|
#define RUBY_RELEASE_DATE "2007-06-20"
|
||||||
#define RUBY_VERSION_CODE 190
|
#define RUBY_VERSION_CODE 190
|
||||||
#define RUBY_RELEASE_CODE 20070619
|
#define RUBY_RELEASE_CODE 20070620
|
||||||
#define RUBY_PATCHLEVEL 0
|
#define RUBY_PATCHLEVEL 0
|
||||||
|
|
||||||
#define RUBY_VERSION_MAJOR 1
|
#define RUBY_VERSION_MAJOR 1
|
||||||
@ -9,7 +9,7 @@
|
|||||||
#define RUBY_VERSION_TEENY 0
|
#define RUBY_VERSION_TEENY 0
|
||||||
#define RUBY_RELEASE_YEAR 2007
|
#define RUBY_RELEASE_YEAR 2007
|
||||||
#define RUBY_RELEASE_MONTH 6
|
#define RUBY_RELEASE_MONTH 6
|
||||||
#define RUBY_RELEASE_DAY 19
|
#define RUBY_RELEASE_DAY 20
|
||||||
|
|
||||||
#ifdef RUBY_EXTERN
|
#ifdef RUBY_EXTERN
|
||||||
RUBY_EXTERN const char ruby_version[];
|
RUBY_EXTERN const char ruby_version[];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user