diff options
author | Father Chrysostomos <sprout@cpan.org> | 2013-08-10 06:06:56 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2013-08-11 07:41:27 -0700 |
commit | 5a37a95f0f47817e59d3f5f9e96f98b4e0cde07e (patch) | |
tree | 510be1ad64a289aef9261852e2ab476833c76a01 /t | |
parent | ba3062ae5fbdf03fcd307336079938ace26aee2b (diff) | |
download | perl-5a37a95f0f47817e59d3f5f9e96f98b4e0cde07e.tar.gz |
In sv.c:sv_magic don’t allow tying ro COWs
Read-only COWs are read-only and should not be treated as though they
were not. This logic is left over from when READONLY+FAKE meant
copy-on-write.
Diffstat (limited to 't')
-rw-r--r-- | t/op/tie.t | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/t/op/tie.t b/t/op/tie.t index 7aff015276..eb53030e21 100644 --- a/t/op/tie.t +++ b/t/op/tie.t @@ -1030,6 +1030,13 @@ EXPECT ok Modification of a read-only value attempted at - line 16. ######## +# +# And one should not be able to tie read-only COWs +for(__PACKAGE__) { tie $_, "" } +sub TIESCALAR {bless []} +EXPECT +Modification of a read-only value attempted at - line 3. +######## # Similarly, read-only regexps cannot be tied. sub TIESCALAR { bless [] } |