binarylogic/settingslogic — pull request #36 by hypomodern (2012-08-15 17:54:28+00:00)
Title: Fix Array#flatten on an array containing a Settingslogic object...

...by delegating method_missing to Hash in the specific case.

On newer rubies, Array#flatten calls #to_ary on everything in the array, which raises a MissingSetting error from a Settingslogic object. This was reported as an rspec-core issue, but is more a ruby/settingslogic deal.

At any rate, you'd see an unhandled `Settingslogic::MissingSetting: Missing setting 'to_ary'` if you happened to have a Settingslogic object in an array that got flattened.

This is particularly a pain point with newer rspec. See https://github.com/rspec/rspec-core/issues/620 for the initial bug report, which was referred to Settingslogic for a fix. I concur.

My editor hates trailing whitespace, so that's redacted in there too :).