Fix Array#flatten on an array containing a Settingslogic object...#36
Fix Array#flatten on an array containing a Settingslogic object...#36hypomodern wants to merge 1 commit intobinarylogic:masterfrom hypomodern:fix-rspec-blowup
Conversation
…legating method_missing to Hash in the specific case. On newer rubies, Array#flatten calls #to_ary on everything in the array, which causes a MissingSetting error from a Settingslogic object. This was reported as an rspec-core issue, but is more a ruby/settingslogic deal.
|
I'm +1 for this as it currently bites me. |
|
+1 .. break my build too. |
|
+1 |
1 similar comment
|
+1 |
|
Interestingly, after monkey-patching this I got /usr/local/opt/rbenv/versions/1.9.3-p374/lib/ruby/gems/1.9.1/gems/settingslogic-2.0.8/lib/settingslogic.rb:173:in So I ended up adding ie. |
|
+1 |
|
I got the same issue. +1 |
|
+1 from me, too. Is there anything we can do to help get this merged? |
|
+1 same issue here |
|
+1 |
1 similar comment
|
👍 |
|
👍 |
1 similar comment
|
👍 |
…ing) Fix Array#flatten on an array containing a Settingslogic object binarylogic#36
...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 rspec/rspec-core#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 :).