summaryrefslogtreecommitdiff
path: root/re.c
diff options
context:
space:
mode:
authorYusuke Endoh <mame@ruby-lang.org>2022-03-31 10:07:09 +0900
committerYusuke Endoh <mame@ruby-lang.org>2022-03-31 10:07:09 +0900
commitc499a4c28a62813752aeb894d68d92fcec850ac0 (patch)
treed897a20dd478f98ef11a878b33d8d26d78e3f037 /re.c
parent3a70d4cd60d0b0765d44792d226a1f2ffc38c931 (diff)
re.c: stop a wrong warning of "flags ignored" on Regexp.new(//)
[Bug #18669]
Diffstat (limited to 're.c')
-rw-r--r--re.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/re.c b/re.c
index 8666e449ec..a4cd2e39b9 100644
--- a/re.c
+++ b/re.c
@@ -3557,7 +3557,7 @@ rb_reg_initialize_m(int argc, VALUE *argv, VALUE self)
if (RB_TYPE_P(src, T_REGEXP)) {
VALUE re = src;
- if (opts != Qundef) {
+ if (opts != Qnil) {
rb_warn("flags ignored");
}
rb_reg_check(re);