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

Enumerable#to_set accepts a block #1473

Closed
soutaro opened this issue Aug 28, 2023 · 0 comments · Fixed by #1595
Closed

Enumerable#to_set accepts a block #1473

soutaro opened this issue Aug 28, 2023 · 0 comments · Fixed by #1595
Labels
rbs Issues of RBS type definition
Milestone

Comments

@soutaro
Copy link
Member

soutaro commented Aug 28, 2023

soutaro/steep#904

def shingle(document, k)
  max_index = document.length - k + 1
  max_index.times.to_set { |i| document[i...(i + k)] }
end
@soutaro soutaro added the rbs Issues of RBS type definition label Aug 28, 2023
@soutaro soutaro added this to the RBS 3.3 milestone Aug 28, 2023
@soutaro soutaro mentioned this issue Nov 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rbs Issues of RBS type definition
Development

Successfully merging a pull request may close this issue.

1 participant