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
Conversation
There was a problem hiding this 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] |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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: |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amended.
Further compliance with https://github.com/ruby/ruby/blob/master/doc/method_documentation.rdoc#details-and-examples-