summaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-07-19 17:26:04 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-07-19 17:26:04 +0000
commitfe4de8b4b8a614e6fdd04766a45b996346d9e028 (patch)
tree1d5c45896c45281a422b3224a0d9f5994126d796 /string.c
parent3f39e3e2a0e3d0fdbf71c7de12348f243b4fbb98 (diff)
* string.c (rb_str_match2): add warning to "~string".
[ruby-list:37751] * lib/net/ftp.rb (Net::FTP::open): takes block. suggested by Gavin Sinclair in [ruby-core:01237]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4105 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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)));
}