Skip to content
This repository was archived by the owner on Jun 30, 2018. It is now read-only.

Fixing settings failure problem where there is no index#816

Open
hexgnu wants to merge 1 commit intokarmi:masterfrom
hexgnu:settings_fix
Open

Fixing settings failure problem where there is no index#816
hexgnu wants to merge 1 commit intokarmi:masterfrom
hexgnu:settings_fix

Conversation

@hexgnu
Copy link

@hexgnu hexgnu commented Jul 31, 2013

What

If you have an index that doesn't exist like Tire.index('foobaz') and call the method settings on it, it will error out due to a nil trying to be accessed like a hash.

This aims to fix that by returning a blank hash instead.

Since Tire.index('foobaz') returns an index even though one isn't made I figured this would be the approach you would like.

How to test

I put a spec in there to ensure that the error doesn't happen in the future.

Let me know if there's something I can change! Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant