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

Use RUBY_ASSERT when available #12216

Closed

Commits on Mar 13, 2023

  1. Use RUBY_ASSERT when available

    It should be present from Ruby 2.7 onwards.
    
    The advantage over a raw `assert` is that it will trigger MRI's
    crash report on failure, making it much easier to debug at
    a glance.
    
    For context I'm trying to debug an assertion failure we've been seeing
    on Ruby nigthly builds:
    
    ```
    ruby: protobuf.c:404: ObjectCache_Add: Assertion `ObjectCache_Get(key) == val' failed.
    ```
    byroot committed Mar 13, 2023
    Configuration menu
    Copy the full SHA
    cb3b121 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e834ad3 View commit details
    Browse the repository at this point in the history