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

Remove checks for self returned in array.c and hash.c examples #3446

Merged
merged 2 commits into from Aug 23, 2020
Merged

Remove checks for self returned in array.c and hash.c examples #3446

merged 2 commits into from Aug 23, 2020

Conversation

BurdetteLamar
Copy link
Member

@BurdetteLamar BurdetteLamar added the Documentation Improvements to documentation. label Aug 22, 2020
Copy link
Contributor

@jeremyevans jeremyevans left a comment

Choose a reason for hiding this comment

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

Looks pretty good. There is one case where the whitespace looks wrong, and a couple of possible other places that could be improved (in a later commit if you want).

array.c Outdated
* s1 = 'bar'; s2 = 'bar'
* a = [:foo, s1, 2, s2]
* a.delete('bar') # => "bar"
* a # => [:foo, 2]
Copy link
Contributor

Choose a reason for hiding this comment

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

The whitespace looks wrong here.

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed.

hash.c Outdated
@@ -1949,7 +1949,6 @@ rb_check_hash_type(VALUE hash)
* Returns the given <tt>obj</tt> if it is a Hash:
* h = {}
* h1 = Hash.try_convert(h)
Copy link
Contributor

Choose a reason for hiding this comment

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

You may want to remove these two example lines as well.

Copy link
Member Author

Choose a reason for hiding this comment

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

Removed.

hash.c Outdated
@@ -3320,9 +3288,7 @@ each_pair_i_fast(VALUE key, VALUE value, VALUE _)
*
* Calls the given block with each key-value pair, returning self:
Copy link
Contributor

Choose a reason for hiding this comment

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

May want to use +self+ here.

Copy link
Member Author

Choose a reason for hiding this comment

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

Amended.

@BurdetteLamar BurdetteLamar merged commit 1d3e87a into ruby:master Aug 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation Improvements to documentation.
2 participants