diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-04-20 06:52:30 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-04-20 06:52:30 +0000 |
commit | 86b1179a03791002b6428f5b49754d7411933e9e (patch) | |
tree | dd7669603e35f7e216ebd92fe163828456dd2ae1 /parse.y | |
parent | e06aaf699d03daa4020d55c34876e5ec12f0e91d (diff) |
error.c: SyntaxError#initialize
* error.c (syntax_error_initialize): move the default message,
"compile error", from parse.y. the default parameter should
belong to the class definition.
* parse.y (yycompile0): use the default parameter.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54654 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r-- | parse.y | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -5551,8 +5551,7 @@ yycompile0(VALUE arg) if (parser->error_p) { VALUE mesg = parser->error_buffer; if (!mesg) { - mesg = rb_fstring_cstr("compile error"); - mesg = rb_exc_new_str(rb_eSyntaxError, mesg); + mesg = rb_class_new_instance(0, 0, rb_eSyntaxError); } rb_set_errinfo(mesg); return 0; |