summaryrefslogtreecommitdiff
path: root/vxs.inc
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2013-09-11 09:03:14 -0700
committerFather Chrysostomos <sprout@cpan.org>2014-01-04 05:10:03 -0800
commit11e14f5aadedb74e66c75f3baa44e4eb93dcf1c1 (patch)
tree13537580de2810bce1889abc48d391c16d7250ee /vxs.inc
parent0c96c5119b141504870531786977196e1fe39c5f (diff)
downloadperl-11e14f5aadedb74e66c75f3baa44e4eb93dcf1c1.tar.gz
[rt.cpan.org #88495] version->new str cmp bug
We shouldn’t consider ver and version to be the same class. If ver inherits from version, ver->new should give a ver object. This string comparison bug has only ever existed in the perl core version of the version routines. It was ed1db70e1224 in 5.16 that introduced it.
Diffstat (limited to 'vxs.inc')
-rw-r--r--vxs.inc3
1 files changed, 2 insertions, 1 deletions
diff --git a/vxs.inc b/vxs.inc
index a8b92944f7..3217670252 100644
--- a/vxs.inc
+++ b/vxs.inc
@@ -204,7 +204,8 @@ XS(XS_version_new)
}
rv = new_version(vs);
- if ( strnNE(classname,"version", len) ) /* inherited new() */
+ if ( len != 7
+ || strnNE(classname,"version", len) ) /* inherited new() */
sv_bless(rv, gv_stashpvn(classname, len, GV_ADD | flags));
mPUSHs(rv);