summaryrefslogtreecommitdiff
path: root/op.c
diff options
context:
space:
mode:
authorLeon Timmermans <fawaka@gmail.com>2015-01-21 23:43:36 +0100
committerFather Chrysostomos <sprout@cpan.org>2015-01-22 22:15:10 -0800
commitc18e654645e660922fda3838b93412351e388142 (patch)
treeac23f2b1084a99c2d84abc7786bc0a876adda75e /op.c
parent6a40a726ac1d6a8f37527d834a781fc5c38e12f0 (diff)
downloadperl-c18e654645e660922fda3838b93412351e388142.tar.gz
[perl #123619] Only make stringy classnames shared
This caused failures in autobox that expect their invocant to be something other than a string (e.g. a number). See also [cpan #100819].
Diffstat (limited to 'op.c')
-rw-r--r--op.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/op.c b/op.c
index d2ce7b95a7..e01e58b65c 100644
--- a/op.c
+++ b/op.c
@@ -11894,7 +11894,7 @@ Perl_ck_subr(pTHX_ OP *o)
}
/* make class name a shared cow string to speedup method calls */
/* constant string might be replaced with object, f.e. bigint */
- if (const_class && !SvROK(*const_class)) {
+ if (const_class && SvPOK(*const_class)) {
STRLEN len;
const char* str = SvPV(*const_class, len);
if (len) {