HomePhorge

Fix the shellquote parser function on Ruby 1.9
860d91658e74Unpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

Fix the shellquote parser function on Ruby 1.9

The semantics of String#include? changed a little in Ruby 1.9, so that you
can't just pass an arbitrary integer and have it check for character
containment. (...or, perhaps, the semantics of characters vs integers
changed. Either way, the effect is the same.)

This fixes the code to do the right thing on all platforms; we want to process
the string byte-wise, since that is how sh may well regard it, and we have to
work around some limitations on 1.8.5 semantics of string iterators.

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
rPU1b8a64f00d48: Whitespace and formatting cleanup on shellquote spec.
Branches
Unknown
Tags
Unknown

Event Timeline

Daniel Pittman <daniel@puppetlabs.com> committed rPU860d91658e74: Fix the shellquote parser function on Ruby 1.9 (authored by Daniel Pittman <daniel@puppetlabs.com>).Mar 30 2012, 9:15 PM