summaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
Diffstat (limited to 'string.c')
-rw-r--r--string.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/string.c b/string.c
index 692a158c09..b2761f04eb 100644
--- a/string.c
+++ b/string.c
@@ -1063,6 +1063,9 @@ rb_str_match2(str)
VALUE str;
{
StringValue(str);
+#if RUBY_VERSION_CODE < 181
+ rb_warn("~string will be obsolete; use explicit regexp");
+#endif
return rb_reg_match2(rb_reg_regcomp(rb_reg_quote(str)));
}