summaryrefslogtreecommitdiff
path: root/parse.y
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-05-01 10:53:18 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-05-01 10:53:18 +0000
commitad528e85c6cd6dddb51b750b6fbf3e817468e600 (patch)
treedb5eb9a79809b4c140f0e824b5d0ccde6d73ab4b /parse.y
parentf7397d988a7bf736c1a35daa0c4e58d6fc021ac1 (diff)
parse.y: show symbol name
* parse.y (must_be_dynamic_symbol): show the name if it is a static symbol. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45771 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y3
1 files changed, 3 insertions, 0 deletions
diff --git a/parse.y b/parse.y
index 676206a36d..2bf554372b 100644
--- a/parse.y
+++ b/parse.y
@@ -10457,6 +10457,9 @@ static ID intern_str(VALUE str);
static void
must_be_dynamic_symbol(VALUE x)
{
+ if (STATIC_SYM_P(x)) {
+ rb_raise(rb_eTypeError, "wrong argument %+"PRIsVALUE" (expected dynamic Symbol)", x);
+ }
if (SPECIAL_CONST_P(x) || BUILTIN_TYPE(x) != T_SYMBOL) {
rb_raise(rb_eTypeError, "wrong argument type %s (expected Symbol)",
rb_builtin_class_name(x));