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

fixes typos on readme. #1019

Merged
merged 1 commit into from
Dec 4, 2015
Merged

Conversation

common-nighthawk
Copy link
Contributor

removes erroneous comma after last key/value pair in ruby hash.

@awood45
Copy link
Member

awood45 commented Dec 4, 2015

I wouldn't call this erroneous, in the sense that the code works just fine (it would be invalid JSON, but not invalid Ruby). Stylistically though this is a cleaner look.

@awood45
Copy link
Member

awood45 commented Dec 4, 2015

I'll go with the best practice on this one. Thanks!

awood45 added a commit that referenced this pull request Dec 4, 2015
@awood45 awood45 merged commit c30dbc3 into aws:master Dec 4, 2015
@common-nighthawk
Copy link
Contributor Author

Thanks for the merge, Alex.

I'm embarrassed to say that I thought { 'hello' => 'world', 'foo' => 'bar', } was invalid Ruby code. I should have run it in IRB first.

However, I did confirm that this syntax is consistent with accepted best practices--
https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas

Which is all to say... sorry for using 'erroneous' 😉

(I recently watched your talk from RailsConf15. Thanks for everything re: AWS + rb.)

@awood45
Copy link
Member

awood45 commented Dec 4, 2015

Correct. It's a common misconception due to the fact that JSON will break, but it's a best practice to exclude the comma.

Also, I appreciate the thanks, hope the workshop was useful!

trevorrowe added a commit that referenced this pull request Dec 9, 2015
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.

2 participants