summaryrefslogtreecommitdiffstats
path: root/parse.y
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-05-01 09:42:38 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-05-01 09:42:38 +0000
commit817a62de81d75c73cceb453301ef27b094f17c14 (patch)
tree65e06d76c544a8d80296d686bf88ec3af41fdc50 /parse.y
parent5cffff58445b5aec50bd4abe2198bf84b8dd68c4 (diff)
downloadruby-817a62de81d75c73cceb453301ef27b094f17c14.tar.gz
ruby-817a62de81d75c73cceb453301ef27b094f17c14.tar.xz
ruby-817a62de81d75c73cceb453301ef27b094f17c14.zip
2000-05-01
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@678 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y20
1 files changed, 10 insertions, 10 deletions
diff --git a/parse.y b/parse.y
index 73494fc3e..466c5994e 100644
--- a/parse.y
+++ b/parse.y
@@ -1,4 +1,4 @@
-/************************************************
+/**********************************************************************
parse.y -
@@ -8,7 +8,7 @@
Copyright (C) 1993-2000 Yukihiro Matsumoto
-************************************************/
+**********************************************************************/
%{
@@ -360,7 +360,7 @@ stmt : block_call
$$ = 0;
}
}
- | stmt kRESCUE_MOD expr
+ | stmt kRESCUE_MOD stmt
{
$$ = NEW_RESCUE($1, NEW_RESBODY(0,$3,0), 0);
}
@@ -1210,7 +1210,7 @@ primary : literal
if ($8) $5 = NEW_ENSURE($5, $8);
/* NOEX_PRIVATE for toplevel */
- $$ = NEW_DEFN($2, $4, $5, class_nest?0:1);
+ $$ = NEW_DEFN($2, $4, $5, class_nest?NOEX_PUBLIC:NOEX_PRIVATE);
fixpos($$, $4);
local_pop();
cur_mid = 0;
@@ -1655,10 +1655,6 @@ singleton : var_ref
if (nd_type($1) == NODE_SELF) {
$$ = NEW_SELF();
}
- else if (nd_type($1) == NODE_NIL) {
- yyerror("Can't define single method for nil.");
- $$ = 0;
- }
else {
$$ = $1;
}
@@ -2454,9 +2450,13 @@ parse_quotedwords(term, paren)
c = '\\';
break;
default:
- if (ISSPACE(c))
+ if (c == term) {
+ tokadd(c);
+ continue;
+ }
+ if (!ISSPACE(c))
tokadd('\\');
- tokadd(c);
+ break;
}
}
else if (ISSPACE(c)) {