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

Fallback to non-colored inspect when coloring takes too long #759

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Nov 13, 2023

  1. Fallback to non-colored inspect when coloring takes too long

    Inspecting large objects may take a long time since IRB colors
    the entire output of #inspect all at once.
    This patch lets IRB to give up coloring after a certain time and fall
    back to non-colored output.
    Changes can be observed by inspecting large Arrays, for example
    `[1] * 1000000`.
    
    The default timeout is 2 seconds, but this can be configured through
    `IRB.conf[:INSPECT_COLORING_TIMEOUT]`.
    Passing nil to this option will disable timeouts (IRB will never fall
    back to non-colored output).
    osyoyu committed Nov 13, 2023
    Configuration menu
    Copy the full SHA
    ed17ddc View commit details
    Browse the repository at this point in the history