Skip to content

Let IRB::Color.colorable? always return true|false - #940

Merged
st0012 merged 1 commit into
ruby:masterfrom
tompng:bool_colorable
May 1, 2024
Merged

st0012 merged 1 commit into
ruby:masterfrom
tompng:bool_colorable

Conversation

@tompng

@tompng tompng commented May 1, 2024

Copy link
Copy Markdown
Member

IRB::Color.colorable? is used in exc.full_message(order:, highlight: HERE) and hightlight requires boolean or nil value.

When it is used for full_message, IRB::Color.colorable? always returns boolean value, but looking at the code, it was not obvious. It looks like there is a chance to return an integer value.

@st0012 st0012 added the bug Something isn't working label May 1, 2024
@st0012
st0012 merged commit 0bbe435 into ruby:master May 1, 2024
@tompng
tompng deleted the bool_colorable branch May 1, 2024 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants