diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-04-01 07:40:39 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-04-01 07:40:39 +0000 |
commit | 06c88786ed55e2056565d08b6a16d3c34ff5cb93 (patch) | |
tree | 9962d1d7ba222f814da36fed6293734fe2a2e8ad /re.c | |
parent | 0ccfe451346bd2f3e13fdd9bd69bd07a331d5fab (diff) |
* re.c (match_setter): it's OK to assign nil to $~.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@2313 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 're.c')
-rw-r--r-- | re.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -1338,7 +1338,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); } |