Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-7825

regexp's with flags and slashes is incorrectly presented using %s and %p

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: PUP 4.10.7, PUP 5.2.0
    • Component/s: None
    • Labels:
      None
    • Template:
    • Team:
      Platform Core
    • Story Points:
      1
    • Sprint:
      Platform Core 2017-09-05, Platform Core 2017-08-08, Platform Core 2017-08-22
    • Method Found:
      Manual Test
    • Release Notes:
      Not Needed
    • Release Notes Summary:
      Not a user facing issue.
    • QA Risk Assessment:
      No Action
    • QA Risk Assessment Reason:
      Covered by spec tests

      Description

      The puppet StringFormatter relies on the ruby #inspect method when a regexp has flags. This is bad because a) the output is not consistent between different ruby versions, and b) the '/' character is incorrectly escaped. This leads to problems in other implementations where '/' isn't used as a regexp delimiter at all.

      The problem is minor because such regexps cannot be created from Puppet code (puppet doesn't support flags).

        Attachments

          Issue Links

            Activity

              jsd-sla-details-panel

                People

                • Assignee:
                  Unassigned
                  Reporter:
                  thomas.hallgren Thomas Hallgren
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  6 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: