aboutsummaryrefslogtreecommitdiffstats
path: root/parse.y
diff options
context:
space:
mode:
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y10
1 files changed, 5 insertions, 5 deletions
diff --git a/parse.y b/parse.y
index c77b7a558d..59614b6936 100644
--- a/parse.y
+++ b/parse.y
@@ -741,15 +741,15 @@ static void ripper_compile_error(struct parser_params*, const char *fmt, ...);
# define WARN_S(s) s
# define WARN_I(i) i
# define PRIsWARN PRIsVALUE
-# define WARN_ARGS(fmt,n) ruby_sourcefile, ruby_sourceline, (fmt)
+# define WARN_ARGS(fmt,n) WARN_ARGS_L(ruby_sourceline,fmt,n)
# define WARN_ARGS_L(l,fmt,n) ruby_sourcefile, (l), (fmt)
# define WARN_CALL rb_compile_warn
# define WARNING_ARGS(fmt,n) WARN_ARGS(fmt,n)
# define WARNING_ARGS_L(l,fmt,n) WARN_ARGS_L(l,fmt,n)
# define WARNING_CALL rb_compile_warning
-# define rb_compile_error rb_compile_error_with_enc
-# define compile_error (parser->error_p = 1),rb_compile_error_with_enc
-# define PARSER_ARG ruby_sourcefile, ruby_sourceline, (void *)current_enc,
+# define rb_compile_error rb_compile_error_str
+# define compile_error (parser->error_p = 1),rb_compile_error_str
+# define PARSER_ARG ruby_sourcefile_string, ruby_sourceline, (void *)current_enc,
#endif
/* Older versions of Yacc set YYMAXDEPTH to a very low value by default (150,
@@ -7020,7 +7020,7 @@ parser_set_encode(struct parser_params *parser, const char *name)
error:
excargs[0] = rb_eArgError;
excargs[2] = rb_make_backtrace();
- rb_ary_unshift(excargs[2], rb_sprintf("%s:%d", ruby_sourcefile, ruby_sourceline));
+ rb_ary_unshift(excargs[2], rb_sprintf("%"PRIsVALUE":%d", ruby_sourcefile_string, ruby_sourceline));
rb_exc_raise(rb_make_exception(3, excargs));
}
enc = rb_enc_from_index(idx);