aboutsummaryrefslogtreecommitdiffstats
path: root/parse.y
diff options
context:
space:
mode:
authormame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-09-14 04:42:23 +0000
committermame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-09-14 04:42:23 +0000
commitc6471c3cbf5bd742b1e9ed1283227108f30f6159 (patch)
tree453601e7b98ed877122cf63c03b0c8a163b463fd /parse.y
parent136b0490fefcbd2269f4edc5b3351ecb1eae756f (diff)
downloadruby-c6471c3cbf5bd742b1e9ed1283227108f30f6159.tar.gz
Fix the lineno of case statement that has no expression
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59886 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y5
1 files changed, 5 insertions, 0 deletions
diff --git a/parse.y b/parse.y
index 985e9beb7e..004e2420b5 100644
--- a/parse.y
+++ b/parse.y
@@ -2687,6 +2687,7 @@ primary : literal
{
/*%%%*/
$$ = NEW_CASE(0, $3);
+ nd_set_line($3, $<num>1);
/*%
$$ = dispatch2(case, Qnil, $3);
%*/
@@ -2937,6 +2938,10 @@ k_until : keyword_until
k_case : keyword_case
{
token_info_push("case");
+ /*%%%*/
+ $<num>$ = ruby_sourceline;
+ /*%
+ %*/
}
;