aboutsummaryrefslogtreecommitdiffstats
path: root/error.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-04-27 05:29:49 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-04-27 05:29:49 +0000
commit02865d9e180cac9266ce0d5cc60e2782cad1d0b8 (patch)
treefc6ee90568444f58aeea654c4f2326cb5b1f73ae /error.c
parent9c8faf66b8aee9ed7564b930251e57f782fbf684 (diff)
downloadruby-02865d9e180cac9266ce0d5cc60e2782cad1d0b8.tar.gz
internal.h: ONLY_FOR_INTERNAL_USE
* error.c (ruby_only_for_internal_use): raise fatal error when deprecated function only for internal use is called, not just a warning. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54791 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'error.c')
-rw-r--r--error.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/error.c b/error.c
index 214d12df5d..5a0184fa48 100644
--- a/error.c
+++ b/error.c
@@ -124,16 +124,26 @@ rb_syntax_error_append(VALUE exc, VALUE file, int line, int column,
void
rb_compile_error_with_enc(const char *file, int line, void *enc, const char *fmt, ...)
{
+ ONLY_FOR_INTERNAL_USE("rb_compile_error_with_enc()");
}
void
rb_compile_error(const char *file, int line, const char *fmt, ...)
{
+ ONLY_FOR_INTERNAL_USE("rb_compile_error()");
}
void
rb_compile_error_append(const char *fmt, ...)
{
+ ONLY_FOR_INTERNAL_USE("rb_compile_error_append()");
+}
+
+void
+ruby_only_for_internal_use(const char *func)
+{
+ rb_print_backtrace();
+ rb_fatal("%s is only for internal use and deprecated; do not use", func);
}
static VALUE