mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
3 changed files with 17 additions and 14 deletions
|
@ -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>
|
||||
|
||||
* 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] == '=') {
|
||||
/* attribute assignment */
|
||||
char *buf = ALLOCA_N(char,last+1);
|
||||
|
||||
strncpy(buf, name, last);
|
||||
buf[last] = '\0';
|
||||
id = rb_intern(buf);
|
||||
id = rb_intern2(name, last);
|
||||
if (id > tLAST_TOKEN && !is_attrset_id(id)) {
|
||||
id = rb_id_attrset(id);
|
||||
goto id_register;
|
||||
|
@ -8481,9 +8477,9 @@ rb_intern2(const char *name, long len)
|
|||
break;
|
||||
}
|
||||
if (!ISDIGIT(*m)) {
|
||||
while (m <= name + last && is_identchar(*m)) {
|
||||
m += mbclen(*m);
|
||||
}
|
||||
while (m <= name + last && is_identchar(*m)) {
|
||||
m += mbclen(*m);
|
||||
}
|
||||
}
|
||||
if (*m) id = ID_JUNK;
|
||||
new_id:
|
||||
|
@ -8976,13 +8972,13 @@ ripper_id2sym(ID id)
|
|||
return ID2SYM(rb_intern(name));
|
||||
}
|
||||
switch (id) {
|
||||
case tOROP:
|
||||
case tOROP:
|
||||
name = "||";
|
||||
break;
|
||||
case tANDOP:
|
||||
case tANDOP:
|
||||
name = "&&";
|
||||
break;
|
||||
default:
|
||||
default:
|
||||
name = rb_id2name(id);
|
||||
if (!name) {
|
||||
rb_bug("cannot convert ID to string: %ld", (unsigned long)id);
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#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_RELEASE_CODE 20070619
|
||||
#define RUBY_RELEASE_CODE 20070620
|
||||
#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 6
|
||||
#define RUBY_RELEASE_DAY 19
|
||||
#define RUBY_RELEASE_DAY 20
|
||||
|
||||
#ifdef RUBY_EXTERN
|
||||
RUBY_EXTERN const char ruby_version[];
|
||||
|
|
Loading…
Reference in a new issue