diff options
author | NARUSE, Yui <[email protected]> | 2019-12-04 01:26:28 +0900 |
---|---|---|
committer | NARUSE, Yui <[email protected]> | 2019-12-04 06:40:54 +0900 |
commit | 08074eb71229b4c9f669f7bfb215bbb43525bfc0 (patch) | |
tree | 506ba272f8a792ced96d945594335d83d2128114 /re.c | |
parent | a705f6472c3e34422776d886bbc9f98676d8c0eb (diff) |
Revert "Revert nil error and adding deprecation message"
This reverts commit 452bee3ee8d68059fabd9b1c7a75661b14e3933e.
Diffstat (limited to 're.c')
-rw-r--r-- | re.c | 8 |
1 files changed, 1 insertions, 7 deletions
@@ -3299,9 +3299,7 @@ rb_reg_match_m(int argc, VALUE *argv, VALUE re) pos = 0; } - if (NIL_P(str)) { - rb_warn("given argument is nil"); - } + str = SYMBOL_P(str) ? rb_sym2str(str) : StringValue(str); pos = reg_match_pos(re, &str, pos); if (pos < 0) { rb_backref_set(Qnil); @@ -3347,10 +3345,6 @@ rb_reg_match_p(VALUE re, VALUE str, long pos) const UChar *start, *end; int tmpreg; - if (NIL_P(str)) { - rb_warn("given argument is nil"); - return Qfalse; - } str = SYMBOL_P(str) ? rb_sym2str(str) : StringValue(str); if (pos) { if (pos < 0) { |