summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cpan/version/t/coretests.pm1
-rw-r--r--vxs.inc4
2 files changed, 3 insertions, 2 deletions
diff --git a/cpan/version/t/coretests.pm b/cpan/version/t/coretests.pm
index 34b0181fc7..7ece45b424 100644
--- a/cpan/version/t/coretests.pm
+++ b/cpan/version/t/coretests.pm
@@ -579,6 +579,7 @@ SKIP: {
{ # https://rt.cpan.org/Ticket/Display.html?id=88495
@ver::ISA = "version";
is ref(ver->new), 'ver', 'ver can inherit from version';
+ is ref(ver->qv("1.2.3")), 'ver', 'ver can inherit from version';
}
}
diff --git a/vxs.inc b/vxs.inc
index 56b8902287..b239fadf61 100644
--- a/vxs.inc
+++ b/vxs.inc
@@ -436,8 +436,8 @@ XS(XS_version_qv)
} else {
rv = sv_2mortal(new_version(ver));
}
- if ( items == 2
- && strnNE(classname,"version", len) ) { /* inherited new() */
+ if ( items == 2 && (len != 7
+ || strnNE(classname,"version", len)) ) { /* inherited new() */
sv_bless(rv, gv_stashpvn(classname, len, GV_ADD | flags));
}
PUSHs(rv);