diff options
author | Kenichi Kamiya <kachick1@gmail.com> | 2019-11-03 09:24:55 +0900 |
---|---|---|
committer | Benoit Daloze <eregontp@gmail.com> | 2019-11-03 11:03:04 +0100 |
commit | 31110d820cc1258cbc84b46ecc65b254c7d5529a (patch) | |
tree | 4701ca0fa6ea70de062c2c0caf809b115925977f /re.c | |
parent | 452bee3ee8d68059fabd9b1c7a75661b14e3933e (diff) | |
download | ruby-31110d820cc1258cbc84b46ecc65b254c7d5529a.tar.gz |
Improve warning message
https://github.com/ruby/ruby/pull/2637#discussion_r341812475
Diffstat (limited to 're.c')
-rw-r--r-- | re.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -3324,7 +3324,7 @@ rb_reg_match_m(int argc, VALUE *argv, VALUE re) } if (NIL_P(str)) { - rb_warn("given argument is nil"); + rb_warn("given argument is nil; this will raise a TypeError in the next release"); } pos = reg_match_pos(re, &str, pos); if (pos < 0) { @@ -3372,7 +3372,7 @@ rb_reg_match_p(VALUE re, VALUE str, long pos) int tmpreg; if (NIL_P(str)) { - rb_warn("given argument is nil"); + rb_warn("given argument is nil; this will raise a TypeError in the next release"); return Qfalse; } str = SYMBOL_P(str) ? rb_sym2str(str) : StringValue(str); |