mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* parse.y (value_expr_gen): warn for empty expression ().
[ruby-dev:31252] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12840 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
3c5510565b
commit
46eb6e9428
3 changed files with 16 additions and 6 deletions
|
@ -125,6 +125,11 @@ Fri Jul 20 09:50:40 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
|||
* bootstraptest/runner.rb (cleanup_coredump, check_coredump): see
|
||||
stackdump file too.
|
||||
|
||||
Thu Jul 19 20:39:30 2007 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||
|
||||
* parse.y (value_expr_gen): warn for empty expression ().
|
||||
[ruby-dev:31252]
|
||||
|
||||
Thu Jul 19 19:24:14 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* eval_error.ci (get_backtrace): check the result more.
|
||||
|
|
11
parse.y
11
parse.y
|
@ -1158,6 +1158,7 @@ expr_value : expr
|
|||
/*%%%*/
|
||||
value_expr($1);
|
||||
$$ = $1;
|
||||
if (!$$) $$ = NEW_NIL();
|
||||
/*%
|
||||
$$ = $1;
|
||||
%*/
|
||||
|
@ -1772,7 +1773,6 @@ arg : lhs '=' arg
|
|||
| var_lhs tOP_ASGN arg
|
||||
{
|
||||
/*%%%*/
|
||||
value_expr($3);
|
||||
if ($1) {
|
||||
ID vid = $1->nd_vid;
|
||||
if ($2 == tOROP) {
|
||||
|
@ -2206,6 +2206,7 @@ arg_value : arg
|
|||
/*%%%*/
|
||||
value_expr($1);
|
||||
$$ = $1;
|
||||
if (!$$) $$ = NEW_NIL();
|
||||
/*%
|
||||
$$ = $1;
|
||||
%*/
|
||||
|
@ -2929,6 +2930,7 @@ primary_value : primary
|
|||
/*%%%*/
|
||||
value_expr($1);
|
||||
$$ = $1;
|
||||
if (!$$) $$ = NEW_NIL();
|
||||
/*%
|
||||
$$ = $1;
|
||||
%*/
|
||||
|
@ -4299,8 +4301,9 @@ opt_f_block_arg : ',' f_block_arg
|
|||
singleton : var_ref
|
||||
{
|
||||
/*%%%*/
|
||||
$$ = $1;
|
||||
value_expr($1);
|
||||
$$ = $1;
|
||||
if (!$$) $$ = NEW_NIL();
|
||||
/*%
|
||||
$$ = $1;
|
||||
%*/
|
||||
|
@ -7228,7 +7231,6 @@ gettable_gen(struct parser_params *parser, ID id)
|
|||
static NODE*
|
||||
assignable_gen(struct parser_params *parser, ID id, NODE *val)
|
||||
{
|
||||
value_expr(val);
|
||||
if (id == keyword_self) {
|
||||
yyerror("Can't change the value of self");
|
||||
}
|
||||
|
@ -7447,6 +7449,9 @@ value_expr_gen(struct parser_params *parser, NODE *node)
|
|||
{
|
||||
int cond = 0;
|
||||
|
||||
if (!node) {
|
||||
rb_warning0("empty expression");
|
||||
}
|
||||
while (node) {
|
||||
switch (nd_type(node)) {
|
||||
case NODE_DEFN:
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#define RUBY_VERSION "1.9.0"
|
||||
#define RUBY_RELEASE_DATE "2007-07-22"
|
||||
#define RUBY_RELEASE_DATE "2007-07-23"
|
||||
#define RUBY_VERSION_CODE 190
|
||||
#define RUBY_RELEASE_CODE 20070722
|
||||
#define RUBY_RELEASE_CODE 20070723
|
||||
#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 7
|
||||
#define RUBY_RELEASE_DAY 22
|
||||
#define RUBY_RELEASE_DAY 23
|
||||
|
||||
#ifdef RUBY_EXTERN
|
||||
RUBY_EXTERN const char ruby_version[];
|
||||
|
|
Loading…
Add table
Reference in a new issue