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 spec for Range objects to be frozen #868

Merged
merged 1 commit into from
Oct 11, 2021

Conversation

lxxxvi
Copy link
Contributor

@lxxxvi lxxxvi commented Oct 9, 2021

Hello 👋

From #823 :

Regexp literals and all Range objects are frozen. [Feature #8948] [Feature #16377] [Feature #15504]

/foo/.frozen? #=> true
(42...).frozen? # => true

I think spec for frozen Regexp literals already exists:

ruby_version_is "3.0" do
it "is frozen" do
/Hello/.should.frozen?
end
end

So this PR only adds the missing spec for Range objects.

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.

Thanks!

@eregon eregon merged commit 812bc59 into ruby:master Oct 11, 2021
@lxxxvi lxxxvi deleted the add-spec-for-range-objects-to-be-frozen branch January 12, 2023 12:31
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