diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-05-01 10:53:18 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-05-01 10:53:18 +0000 |
commit | ad528e85c6cd6dddb51b750b6fbf3e817468e600 (patch) | |
tree | db5eb9a79809b4c140f0e824b5d0ccde6d73ab4b /parse.y | |
parent | f7397d988a7bf736c1a35daa0c4e58d6fc021ac1 (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.y | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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)); |