summaryrefslogtreecommitdiff
path: root/universal.c
diff options
context:
space:
mode:
Diffstat (limited to 'universal.c')
-rw-r--r--universal.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/universal.c b/universal.c
index 78d30cb516..6b2214d249 100644
--- a/universal.c
+++ b/universal.c
@@ -374,10 +374,10 @@ XS(XS_UNIVERSAL_VERSION)
vnumify(req),vnormal(req),vnumify(sv),vnormal(sv));
}
- if (sv == (SV*)&PL_sv_undef) {
- ST(0) = sv;
- } else {
+ if ( sv_derived_from(sv, "version") ) {
ST(0) = vnumify(sv);
+ } else {
+ ST(0) = sv;
}
XSRETURN(1);