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

Add Set#join spec #862

Merged
merged 2 commits into from
Oct 8, 2021
Merged

Add Set#join spec #862

merged 2 commits into from
Oct 8, 2021

Conversation

aslam
Copy link

@aslam aslam commented Oct 7, 2021

Hello 👋 ,

Add spec for Set#join method.

Set#join is added as a shorthand for .to_a.join.

Ref #823

Copy link
Member

@eregon eregon left a comment

Choose a reason for hiding this comment

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

Thank you, this looks good.
Could you move the specs as I suggested in the other comment?

require_relative '../../../spec_helper'
require 'set'

describe :set_join, shared: true do
Copy link
Member

Choose a reason for hiding this comment

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

Shared specs are normally only used for different method aliases or more generally for multiple (>1) usages.
But I think these specs only apply to Set#join.

Could you move them in library/set/join_spec.rb?

Copy link
Author

Choose a reason for hiding this comment

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

sure 👍

@aslam aslam requested a review from eregon October 8, 2021 12:23
Copy link
Member

@eregon eregon left a comment

Choose a reason for hiding this comment

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

Thank you for the new specs!

@eregon eregon merged commit 136a6ab into ruby:master Oct 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants