Implement Hash/Array ~~ Regex (with tests)
[p5sagit/p5-mst-13.2.git] / pp.c
diff --git a/pp.c b/pp.c
old mode 100644 (file)
new mode 100755 (executable)
index aacb789..9cedc3f
--- a/pp.c
+++ b/pp.c
@@ -5062,9 +5062,9 @@ PP(pp_lock)
     dSP;
     dTOPss;
     SV *retsv = sv;
+    assert(SvTYPE(retsv) != SVt_PVCV);
     SvLOCK(sv);
-    if (SvTYPE(retsv) == SVt_PVAV || SvTYPE(retsv) == SVt_PVHV
-       || SvTYPE(retsv) == SVt_PVCV) {
+    if (SvTYPE(retsv) == SVt_PVAV || SvTYPE(retsv) == SVt_PVHV) {
        retsv = refto(retsv);
     }
     SETs(retsv);