-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Document Array#shift? #4886
Document Array#shift? #4886
Conversation
Welcome back @porras 👍 |
src/array.cr
Outdated
@@ -1507,6 +1507,18 @@ class Array(T) | |||
ary | |||
end | |||
|
|||
# Removes the first value of `self`, at index 0. This method returns the removed value. | |||
# Returns `nil` without raising any error if array is of 0 size. |
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.
I'd turn this sentence around, "If the array is empty..."
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.
It would make sense, I just copied it from the documentation of the question-mark-less method. Should I change it there too?
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.
Yes please.
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.
Thanks for the feedback, I just pushed the change.
e003b2e
to
640ddf0
Compare
I don't think the build failure is related to the change... |
No description provided.