Skip to content

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