summaryrefslogtreecommitdiffstats
path: root/parse.y
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-06-17 14:50:04 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-06-17 14:50:04 +0000
commit1521f3d8f60da0bc12cc078c945583cd0fec1794 (patch)
treea6fe22dc74558d7a677ca7773b249a2531e3e960 /parse.y
parent84c46e23f36e81ed8609c6dfcd229a23c6065b40 (diff)
downloadruby-1521f3d8f60da0bc12cc078c945583cd0fec1794.tar.gz
ruby-1521f3d8f60da0bc12cc078c945583cd0fec1794.tar.xz
ruby-1521f3d8f60da0bc12cc078c945583cd0fec1794.zip
* 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: http://svn.ruby-lang.org/repos/ruby/trunk@10304 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y13
1 files changed, 2 insertions, 11 deletions
diff --git a/parse.y b/parse.y
index f78eba5d4..c542b35b7 100644
--- a/parse.y
+++ b/parse.y
@@ -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) {