[前][次][番号順一覧][スレッド一覧]

ruby-changes:68239

From: Nobuyoshi <ko1@a...>
Date: Mon, 4 Oct 2021 12:20:38 +0900 (JST)
Subject: [ruby-changes:68239] da139317a5 (master): Fix the warning message for dynamic symbol literal in condition

https://git.ruby-lang.org/ruby.git/commit/?id=da139317a5

From da139317a59acb2d79f460bf92331450efa310fe Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Mon, 4 Oct 2021 12:14:27 +0900
Subject: Fix the warning message for dynamic symbol literal in condition

---
 parse.y                  | 2 +-
 test/ruby/test_syntax.rb | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/parse.y b/parse.y
index 6184112d54..189731b45c 100644
--- a/parse.y
+++ b/parse.y
@@ -11758,7 +11758,7 @@ cond0(struct parser_params *p, NODE *node, enum cond_type type, const YYLTYPE *l https://github.com/ruby/ruby/blob/trunk/parse.y#L11758
 	break;
 
       case NODE_DSYM:
-	SWITCH_BY_COND_TYPE(type, warning, "string ")
+	SWITCH_BY_COND_TYPE(type, warning, "symbol ")
 	break;
 
       case NODE_LIT:
diff --git a/test/ruby/test_syntax.rb b/test/ruby/test_syntax.rb
index 8aa169ac0c..bf59ee5379 100644
--- a/test/ruby/test_syntax.rb
+++ b/test/ruby/test_syntax.rb
@@ -1073,7 +1073,7 @@ eom https://github.com/ruby/ruby/blob/trunk/test/ruby/test_syntax.rb#L1073
     assert_warning(/literal in condition/) do
       eval('1 if :foo')
     end
-    assert_warning(/literal in condition/) do
+    assert_warning(/symbol literal in condition/) do
       eval('1 if :"#{"foo".upcase}"')
     end
 
-- 
cgit v1.2.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]