Skip to content

Conversation

@rpriya123
Copy link

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you're calling #to_sym on something that is already a symbol!

@sjreich
Copy link
Contributor

sjreich commented Jan 14, 2016

I like the overall approach - split the string into an array of words, then check whether that array contains the word in question.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since that if statement is the last thing to be evaluated in the method, the return statements aren't needed. In general, Ruby style is to skip the use of return except for early returns (e.g. guard clauses).

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants