summaryrefslogtreecommitdiff
path: root/re.c
diff options
context:
space:
mode:
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 3acf427..500173d 100644
--- a/re.c
+++ b/re.c
@@ -2907,7 +2907,7 @@ rb_reg_initialize_m(int argc, VALUE *argv, VALUE self)
long len;
rb_check_arity(argc, 1, 3);
- if (TYPE(argv[0]) == T_REGEXP) {
+ if (RB_TYPE_P(argv[0], T_REGEXP)) {
VALUE re = argv[0];
if (argc > 1) {