diff options
| author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-11-07 19:18:16 +0000 |
|---|---|---|
| committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-11-07 19:18:16 +0000 |
| commit | 4b37ef828031a3f9cb8281a2d583f559abdd71a1 (patch) | |
| tree | a78adc8cdeb42f4a59788e2e5dda13627a130446 /parse.y | |
| parent | 211a0b556843c1c6aed8069d8b231db86b321cd2 (diff) | |
| download | ruby-4b37ef828031a3f9cb8281a2d583f559abdd71a1.tar.gz ruby-4b37ef828031a3f9cb8281a2d583f559abdd71a1.tar.xz ruby-4b37ef828031a3f9cb8281a2d583f559abdd71a1.zip | |
* class.c (rb_define_method): do not set NOEX_CFUNC if klass is
really a module, whose methods must be safe for reciever's type.
* eval.c (rb_eval): nosuper should not be inherited unless the
overwritten method is an undef placeholder.
* parse.y (primary): allow 'when'-less case statement; persuaded
by Sean Chittenden.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3032 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
| -rw-r--r-- | parse.y | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -485,6 +485,10 @@ stmt : kALIAS fitem {lex_state = EXPR_FNAME;} fitem $$ = 0; } } + | expr kRESCUE_MOD expr + { + $$ = NEW_RESCUE($1, NEW_RESBODY(0,$3,0), 0); + } | primary_value '[' aref_args ']' tOP_ASGN command_call { NODE *args; @@ -1417,6 +1421,10 @@ primary : literal { $$ = $3; } + | kCASE opt_terms kELSE compstmt kEND + { + $$ = $4; + } | kFOR block_var kIN {COND_PUSH(1);} expr_value do {COND_POP();} compstmt kEND |
