HomePhorge

Fix Cisco device canonicalization regular expression on 1.9
b0f9e737fc58Unpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

Fix Cisco device canonicalization regular expression on 1.9

The behaviour of the \b Regexp match operator, or rather, the classification
of / as an end of word character, changed between Ruby 1.8 and 1.9.

Most uses in our code are safe, and this will lead to equally correct
behaviour, but the Cisco device interface canonicalization code used it where
"end of string before newline" was intended.

Moving to the \Z match, which imposes the exactly desired condition,
resolves the problem.

Signed-off-by: Daniel Pittman <daniel@puppetlabs.com>

Details

Provenance
Daniel Pittman <daniel@puppetlabs.com>Authored on
vanmeeuwenPushed on Jun 2 2015, 2:22 PM
Parents
rPU4089770d3411: A correct implementation of IO#binwrite for Ruby 1.8
Branches
Unknown
Tags
Unknown

Event Timeline

Daniel Pittman <daniel@puppetlabs.com> committed rPUb0f9e737fc58: Fix Cisco device canonicalization regular expression on 1.9 (authored by Daniel Pittman <daniel@puppetlabs.com>).Mar 30 2012, 9:15 PM