New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[PATCH] Typo prevents deparsing some transliterations. #16226
Comments
From @lightseyThis is a bug report for perl from john@nixnuts.net, There is a simple typo in B::Deparse that prevents deparsing code Patch with unit test attached. Flags: Site configuration information for perl 5.27.6: Configured by jd at Tue Oct 31 18:13:33 CDT 2017. Summary of my perl5 (revision 5 version 27 subversion 6) configuration: Locally applied patches: @INC for perl 5.27.6: Environment for perl 5.27.6: |
From @lightsey0001-Fix-deparsing-of-transliterations-with-unprintable-c.patchFrom 90fcbde852f41db175162eedc4b5b3f9845901ed Mon Sep 17 00:00:00 2001
From: John Lightsey <lightsey@debian.org>
Date: Tue, 31 Oct 2017 18:12:26 -0500
Subject: [PATCH] Fix deparsing of transliterations with unprintable
characters.
---
lib/B/Deparse.pm | 2 +-
lib/B/Deparse.t | 5 +++++
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/lib/B/Deparse.pm b/lib/B/Deparse.pm
index 4ff427c51c..ceefa58009 100644
--- a/lib/B/Deparse.pm
+++ b/lib/B/Deparse.pm
@@ -5632,7 +5632,7 @@ sub pchr { # ASCII
} elsif ($n == ord "\r") {
return '\\r';
} elsif ($n >= ord("\cA") and $n <= ord("\cZ")) {
- return '\\c' . unctrl{chr $n};
+ return '\\c' . $unctrl{chr $n};
} else {
# return '\x' . sprintf("%02x", $n);
return '\\' . sprintf("%03o", $n);
diff --git a/lib/B/Deparse.t b/lib/B/Deparse.t
index b75a162a0e..d94d7f61da 100644
--- a/lib/B/Deparse.t
+++ b/lib/B/Deparse.t
@@ -2851,3 +2851,8 @@ $x = `$a-$b`;
# multiconcat within qr//
my($r, $a, $b);
$r = qr/abc\Q$a-$b\Exyz/;
+####
+# tr with unprintable characters
+my $str;
+$str = 'foo';
+$str =~ tr/\cA//;
--
2.11.0
|
From @atoomicThanks going to run a smoke before merging it On Mon, 06 Nov 2017 08:22:07 -0800, john@nixnuts.net wrote:
|
The RT System itself - Status changed from 'new' to 'open' |
From @atoomicmerged with b4fb15a On Mon, 06 Nov 2017 08:25:42 -0800, atoomic wrote:
|
@atoomic - Status changed from 'open' to 'resolved' |
From @xsawyerxOn 11/06/2017 05:25 PM, Atoomic via RT wrote:
+1 |
Migrated from rt.perl.org#132405 (status was 'resolved')
Searchable as RT132405$
The text was updated successfully, but these errors were encountered: