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

Document Array#shift? #4886

Merged

Conversation

porras
Copy link
Contributor

@porras porras commented Aug 26, 2017

No description provided.

@sdogruyol
Copy link
Member

@sdogruyol sdogruyol commented Aug 26, 2017

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.
Copy link
Contributor

@RX14 RX14 Aug 26, 2017

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..."

Copy link
Contributor Author

@porras porras Aug 26, 2017

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?

Copy link
Contributor

@RX14 RX14 Aug 27, 2017

Choose a reason for hiding this comment

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

Yes please.

Copy link
Contributor Author

@porras porras Aug 27, 2017

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.

@porras porras force-pushed the document-array-shift-question-mark branch from e003b2e to 640ddf0 Compare Aug 27, 2017
@porras
Copy link
Contributor Author

@porras porras commented Aug 28, 2017

I don't think the build failure is related to the change...

RX14
RX14 approved these changes Sep 1, 2017
@RX14 RX14 merged commit dca2887 into crystal-lang:master Sep 1, 2017
2 checks passed
@RX14 RX14 added this to the Next milestone Sep 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants