From: Rafael Garcia-Suarez Date: Sat, 20 Oct 2007 15:19:20 +0000 (+0000) Subject: Revert code change from #32148 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b9ee0594f2ab168a84a665a336cc190363728aef;p=p5sagit%2Fp5-mst-13.2.git Revert code change from #32148 p4raw-id: //depot/perl@32150 --- diff --git a/sv.c b/sv.c index 25f1441..233f5cb 100644 --- a/sv.c +++ b/sv.c @@ -2514,6 +2514,8 @@ access this function. SV * Perl_sv_2num(pTHX_ register SV *sv) { + if (!SvROK(sv)) + return sv; if (SvAMAGIC(sv)) { SV * const tmpsv = AMG_CALLun(sv,numer); if (tmpsv && (!SvROK(tmpsv) || (SvRV(tmpsv) != SvRV(sv))))