On Dec 31, 11:32 am, Michael DeHaan <michael.deh...@gmail.com> wrote: > > > Though something is perhaps not kosher with it and lsb_release > > > although it works fine for me... > > > The issue seems to be that Facter::Util::Resolution::exec is returning > > an array, not a string. > > My version of Ruby doesn't seem to want to do pattern matches against > > arrays, it seems, though that might have been legal on older Ruby > > versions? > > In the course of trying to eliminate some other warnings, I am finding > this is not the correct fix. Please ignore my patch. > > The code is also trying to call String methods such as each_line on > the results of Facter::Util::Resolution::exec for lspci in other > places. It seems in most places we want a newline joined string. > Any reason to not change it to make it do this? > > There's probably some Ruby version change subtlety at work here seeing > things work without warnings for James on F10.
Ok, some more data from git history: http://github.com/reductivelabs/facter/commit/33fb7709404e706801683e6c47ab7a0a5a1884b1 It looks like "return an array" is new behavior for exec, and maybe it wasn't backported/tested for all of the old facts. Thoughts? In this case the best way to go is probably a "return type" parameter that defaults to strings, and things that want arrays can ask for them. --Michael -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-us...@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.