-
Notifications
You must be signed in to change notification settings - Fork 186
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix Array#flatten on an array containing a Settingslogic object... #36
base: master
Are you sure you want to change the base?
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 |
2 similar comments
+1 |
+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 :).