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

[Ruby 3.0 support] Remove TRUE, FALSE, and NIL constants #2505

Conversation

andrykonchin
Copy link
Member

The PR fixes the following item:

[easy, pure ruby] TRUE/FALSE/NIL constants are no longer defined.

Related issue - #2453

@andrykonchin andrykonchin force-pushed the ruby-3-0-support-remove-true-false-and-nil-constants branch from b92fd3a to a498687 Compare October 17, 2021 22:06
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 added the in-ci The PR is being tested in CI. Do not push new commits. label Oct 18, 2021
@eregon eregon self-assigned this Oct 18, 2021
@andrykonchin
Copy link
Member Author

andrykonchin commented Oct 18, 2021

Not sure how to handle these failing specs in a proper way. Probably, specs should be run on CI with PRETEND_RUBY_VERSION=3.0.0.

Tests fail because the Ruby 2.7 behavior is tested. But here in Ruby 3.0 we have breaking changes. So it's quite expected that new behavior causes these failures.

Example of failed spec:

    ruby_version_is ""..."3.0" do
      it "includes FALSE" do
        Object.const_defined?(:FALSE).should == true
        -> { FALSE }.should complain(/constant ::FALSE is deprecated/)
      end
    end

@eregon
Copy link
Member

eregon commented Oct 18, 2021

@andrykonchin I'll take care of it. I'll try to merge the Ruby 3 import PR first, which bumps the RUBY_VERSION and therefore solves this.

@eregon eregon added this to the 22.0.0 milestone Oct 21, 2021
@eregon eregon force-pushed the ruby-3-0-support-remove-true-false-and-nil-constants branch from a498687 to 72c91e9 Compare October 21, 2021 13:18
@graalvmbot graalvmbot merged commit d282c64 into oracle:master Oct 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in-ci The PR is being tested in CI. Do not push new commits. oca-signed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants