On 05/20/2014 07:16 PM, Brian Mathis wrote: > This is a bug in validate_re(), even though there is a workaround.
Arguably so. One could also argue, on the other hand, that regular expressions are matched by *strings* and nothing else. Sure, we've been spoiled by bash and perl which don't give damn and implicitly convert to string every chance they get. But that isn't a universal truth. Point in fact irb(main):001:0> puts "it works!" if 5 =~ /[0-9]+/ => nil I agree that it *is* inconvenient to check for two cases "is numeric" or "contains a number" when logically the former implies the latter. I also think that implicit string conversion would be a beneficial feature for validate_re. But it is not necessarily a bug. Cheers, Felix -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/537C63ED.2060109%40alumni.tu-berlin.de. For more options, visit https://groups.google.com/d/optout.
