Jira (PUP-10178) split function shouldn't coerce strings to regex
Title: Message Title Maggie Dreyer commented on PUP-10178 Re: split function shouldn't coerce strings to regex Documentation https://puppet.com/docs/puppet/latest/function.html#split Add Comment This message was sent by Atlassian Jira (v8.5.2#805002-sha1:a66f935) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-bugs/JIRA.339939.1576610242000.75131.1604960580367%40Atlassian.JIRA.
Jira (PUP-10178) split function shouldn't coerce strings to regex
Title: Message Title Maggie Dreyer commented on PUP-10178 Re: split function shouldn't coerce strings to regex While not intuitive, if this is documented, it seems easy to work around. I think we're unlikely to fix this either way, so I'm going to close this. Please reopen if that's not true. Add Comment This message was sent by Atlassian Jira (v8.5.2#805002-sha1:a66f935) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-bugs/JIRA.339939.1576610242000.75123.1604960520214%40Atlassian.JIRA.
Jira (PUP-10178) split function shouldn't coerce strings to regex
Title: Message Title Nick Walker commented on PUP-10178 Re: split function shouldn't coerce strings to regex Ben Ford what's the play here? I think we shouldn't change the default behavior so we don't break people relying on the weird behavior. So do we just close this or should we reword this to be about augmenting the function or adding a new one to accomplish whatever needs to be accomplished? Add Comment This message was sent by Atlassian Jira (v8.5.2#805002-sha1:a66f935) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-bugs/JIRA.339939.1576610242000.47941.1601658420045%40Atlassian.JIRA.
Jira (PUP-10178) split function shouldn't coerce strings to regex
Title: Message Title Rob Braden updated an issue Puppet / PUP-10178 split function shouldn't coerce strings to regex Change By: Rob Braden Team: Froyo Add Comment This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-bugs/JIRA.339939.1576610242000.21150.1578937980351%40Atlassian.JIRA.
Jira (PUP-10178) split function shouldn't coerce strings to regex
Title: Message Title Henrik Lindberg commented on PUP-10178 Re: split function shouldn't coerce strings to regex This is for historic reasons - the split function has been doing this since the very start. If this is changed it will need to be changed on a major version boundary as results will be different. The change would need some kind of deprecation - which is tricky as it would be for every call to split where it is given a string. Users would need to convert to regexp to avoid the deprecation, then once the major release takes place the function would stop turning strings into regexp. Alternatively, an option (use_as_string Bool) could be added to the function to tell it what to do - i.e. without option it would be backwards compatible. This would be trivial to add and can be added in any version. Add Comment This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-bugs/JIRA.339939.1576610242000.4405.1576668480232%40Atlassian.JIRA.
Jira (PUP-10178) split function shouldn't coerce strings to regex
Title: Message Title Ben Ford created an issue Puppet / PUP-10178 split function shouldn't coerce strings to regex Issue Type: Bug Assignee: Unassigned Created: 2019/12/17 11:17 AM Priority: Normal Reporter: Ben Ford The split() function turns strings into regexes internally, which is not intuitive and leads to surprising results. $ puppet apply -e 'notice("2.6.3".split("."))' Notice: Scope(Class[main]): [] Notice: Compiled catalog for nyx.local in environment production in 0.03 seconds Notice: Applied catalog in 0.02 seconds Of note, this is not what Ruby does: $ ruby -e "puts '2.6.3'.split('.').inspect"