Skip to content
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

When throwing errors, mention expected/received values #65

Merged
merged 2 commits into from
Mar 11, 2015
Merged

When throwing errors, mention expected/received values #65

merged 2 commits into from
Mar 11, 2015

Conversation

rolodato
Copy link

Also changed strings to single-quote when not interpolating.

excpt added a commit that referenced this pull request Mar 11, 2015
When throwing errors, mention expected/received values
@excpt excpt merged commit ea06b2b into jwt:master Mar 11, 2015
@excpt
Copy link
Member

excpt commented Mar 11, 2015

👍 Thanks :-)

@ZhangHanDong
Copy link
Contributor

Why must change single-quote?
http://viget.com/extend/just-use-double-quoted-ruby-strings

@excpt
Copy link
Member

excpt commented Mar 11, 2015

@ZhangHanDong It's just a code convention or best practice. It's not about speed or anything. It's common to use single quotes for all strings 'Hello Paul' unless you have to pass some values to the string then you use double quotes "Hi #{name}".

@ZhangHanDong
Copy link
Contributor

@excpt I see, just i like use double quoted . all right. : )

@rolodato
Copy link
Author

Yes, it's the convention and it's clearer to see at a first glance if something's being replaced or it's a constant string. Also, some IDEs like RubyMine mark it as a warning by default (double-quote string without interpolation).

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.

3 participants