Skip to content

Improve ruby examples in README #50

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

lionel-rowe
Copy link

  • Choose values that give different results for the two syntaxes
  • Comments use #, not //, in Ruby
  • Semicolons aren't idiomatic in Ruby

@hax
Copy link
Member

hax commented Dec 13, 2023

@lionel-rowe Thank you for the PR.

Choose values that give different results for the two syntaxes

Actually, I'm not sure, but maybe the original author intentionally used an example with the same result?

@lionel-rowe
Copy link
Author

Actually, I'm not sure, but maybe the original author intentionally used an example with the same result?

Not sure what the intention was, but I found it confusing as an illustration of the difference given that they yield the same result. By analogy, if you were trying to explain addition and multiplication to someone who had never heard of those concepts, you probably wouldn't choose 2 and 2 as operands to illustrate the difference between the two.

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