summaryrefslogtreecommitdiff
path: root/re.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-04-01 07:39:09 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-04-01 07:39:09 +0000
commit1550277b3458f2981dac537bd55ee52f5ad5b0e3 (patch)
treeef1aaf41369f3da489e8bdde5e5a41ca58d5a7ba /re.c
parent1ecdc6a115f48c880dff0cbc04f4de831480c748 (diff)
* re.c (match_setter): it's OK to assign nil to $~.
* io.c (rb_io_fptr_cleanup): do not close IO created by for_fd(). * io.c (rb_io_initialize): mark IO created by for_fd * ext/socket/socket.c (bsock_s_for_fd): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2312 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 're.c')
-rw-r--r--re.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/re.c b/re.c
index 67ee4df..b7603e0 100644
--- a/re.c
+++ b/re.c
@@ -1392,7 +1392,9 @@ static void
match_setter(val)
VALUE val;
{
- Check_Type(val, T_MATCH);
+ if (!NIL_P(val)) {
+ Check_Type(val, T_MATCH);
+ }
rb_backref_set(val);
}