Skip to content

Commit

Permalink
For 5.34.0, revert the fix for GH #18614 as it introduces a regression.
Browse files Browse the repository at this point in the history
This reverts the XS code change from March 2021 from commit c71f1f2:
    Make Data::Dumper mark regex output as UTF-8 if needed

retains the new tests, but skips them for Dumpxs.

The change fixed one bug, but introduced another (GH #18764). The fix for
both seems a little too risky this late in the release cycle, so revert to
the v5.32.0 behaviour for the v5.34.0 release itself. Both bugs will be fix
with a CPAN release very soon, which likely will also be in v5.34.1
  • Loading branch information
nwc10 authored and rjbs committed May 15, 2021
1 parent 1f6b8a9 commit bd21571
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
4 changes: 2 additions & 2 deletions dist/Data-Dumper/Dumper.pm
Expand Up @@ -29,7 +29,7 @@ our ( $Indent, $Trailingcomma, $Purity, $Pad, $Varname, $Useqq, $Terse, $Freezer
our ( @ISA, @EXPORT, @EXPORT_OK, $VERSION );

BEGIN {
$VERSION = '2.178'; # Don't forget to set version and release
$VERSION = '2.179'; # Don't forget to set version and release
# date in POD below!

@ISA = qw(Exporter);
Expand Down Expand Up @@ -1476,7 +1476,7 @@ modify it under the same terms as Perl itself.
=head1 VERSION
Version 2.178
Version 2.179
=head1 SEE ALSO
Expand Down
4 changes: 0 additions & 4 deletions dist/Data-Dumper/Dumper.xs
Expand Up @@ -651,10 +651,6 @@ dump_regexp(pTHX_ SV *retval, SV *val)

assert(sv_pattern);

if (SvUTF8(sv_pattern)) {
sv_utf8_upgrade(retval);
}

rval = SvPV(sv_pattern, rlen);
rend = rval+rlen;
slash = rval;
Expand Down
3 changes: 3 additions & 0 deletions dist/Data-Dumper/t/dumper.t
Expand Up @@ -1725,6 +1725,9 @@ EOW
TEST qq(Data::Dumper->Dump([ [qq/\x{41f}/, qr/\x{8b80}/, qr/\x{41f}/] ])),
"string with Unicode + regexp with Unicode";

SKIP_TEST "skipped, pending fix for github #18764";
last;

TEST qq(Data::Dumper->Dumpxs([ [qq/\x{41f}/, qr/\x{8b80}/, qr/\x{41f}/] ])),
"string with Unicode + regexp with Unicode, XS"
if $XS;
Expand Down

0 comments on commit bd21571

Please sign in to comment.