[perl #120182]
the precomp B::OP method was returning a non-UTF8 string even if the
regex was utf8
# walkoptree comes from B.xs
BEGIN {
- $B::VERSION = '1.46';
+ $B::VERSION = '1.47';
@B::EXPORT_OK = ();
# Our BOOT code needs $VERSION set, and will append to @EXPORT_OK.
}
else {
sv_setpvn(ret, RX_PRECOMP(rx), RX_PRELEN(rx));
+ if (RX_UTF8(rx))
+ SvUTF8_on(ret);
}
}
}
use strict;
use Test::More;
-my $tests = 19; # not counting those in the __DATA__ section
+my $tests = 20; # not counting those in the __DATA__ section
use B::Deparse;
my $deparse = B::Deparse->new();
.
EOCODH
+# literal big chars under 'use utf8'
+is($deparse->coderef2text(sub{ use utf8; /€/; }),
+'{
+ /\x{20ac}/;
+}',
+"qr/euro/");
+
done_testing($tests);