diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-06-17 14:50:04 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-06-17 14:50:04 +0000 |
commit | 7b484902220ded077a37a3a2e4587df2fe27f5e0 (patch) | |
tree | a6fe22dc74558d7a677ca7773b249a2531e3e960 /parse.y | |
parent | 7d274ff6fbb97c3ac8ee0ce6903f0e77b05e0b07 (diff) | |
download | ruby-7b484902220ded077a37a3a2e4587df2fe27f5e0.tar.gz |
* eval.c (Init_eval): add aliases invoke_method and
invoke_functional_method corresponding send and funcall
respectively. [ruby-talk:197512]
* parse.y (parser_yylex): returns the most typical keyword token
on EXPR_FNAME. [ruby-core:7995]
* ext/socket/socket.c: protoize.
* parse.y (then): remove ':' from 'then' and 'do' rules.
* hash.c (env_aset): raise TypeError on nil with more descriptive
message. [ruby-core:07990]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10304 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r-- | parse.y | 13 |
1 files changed, 2 insertions, 11 deletions
@@ -1651,7 +1651,7 @@ op : '|' { ifndef_ripper($$ = '|'); } reswords : k__LINE__ | k__FILE__ | klBEGIN | klEND | kALIAS | kAND | kBEGIN | kBREAK | kCASE | kCLASS | kDEF - | kDEFINED | kDO | kDO_BLOCK | kELSE | kELSIF | kEND | kENSURE | kFALSE + | kDEFINED | kDO | kELSE | kELSIF | kEND | kENSURE | kFALSE | kFOR | kIN | kMODULE | kNEXT | kNIL | kNOT | kOR | kREDO | kRESCUE | kRETRY | kRETURN | kSELF | kSUPER | kTHEN | kTRUE | kUNDEF | kWHEN | kYIELD @@ -2834,11 +2834,6 @@ then : term /*%c { $$ = Qnil; } %*/ - | ':' - /*%c%*/ - /*%c - { $$ = Qnil; } - %*/ | kTHEN | term kTHEN /*%c%*/ @@ -2852,11 +2847,6 @@ do : term /*%c { $$ = Qnil; } %*/ - | ':' - /*%c%*/ - /*%c - { $$ = Qnil; } - %*/ | kDO_COND ; @@ -6727,6 +6717,7 @@ parser_yylex(struct parser_params *parser) lex_state = kw->state; if (state == EXPR_FNAME) { set_yylval_id(rb_intern(kw->name)); + return kw->id[0]; } if (kw->id[0] == kDO) { if (lpar_beg && lpar_beg == paren_nest) { |