You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Do you think IRB needs type validation for configs?
Or EVAL_HISTORY=true should enable EVAL_HISTORY with some default size? (maybe about 10?)
These are some other confusing configs and invalid values that raise error.
IRB.conf[:IRB_NAME]=:ruby# should be stringIRB.conf[:IRB_RC]='/path/to/.irbrc'# should be procIRB.conf[:BACK_TRACE_LIMIT]=ENV['IRB_BT_LIM']# should be numberIRB.conf[:PROMPT]='>> '# should be hash
That's totally on me. I should have noticed that some default values were nil and some were not. I don't think we need full type checking, but some defensive programming would be nice... and doco. always doco
@zenspider Sorry for the delay. I've now cleared other priorities and will start looking at this. For the start I'll target the configs listed here, so feel free to add new ones.
Activity
tompng commentedon Nov 21, 2023
IRB.conf[:EVAL_HISTORY]should be number or nil.Do you think IRB needs type validation for configs?
Or
EVAL_HISTORY=trueshould enable EVAL_HISTORY with some default size? (maybe about 10?)These are some other confusing configs and invalid values that raise error.
st0012 commentedon Nov 22, 2023
Yeah both type validation and better documentation (discovery) are needed for those configs.
For this we should also support symbol, or even anything that responds to
to_s?SAVE_HISTORYalso doesn't supporttrue(it has a default of 1000 though). So for consistency I'd say no, unless we want to change them both?zenspider commentedon Nov 30, 2023
That's totally on me. I should have noticed that some default values were nil and some were not. I don't think we need full type checking, but some defensive programming would be nice... and doco. always doco
zenspider commentedon Mar 18, 2024
@st0012 want me to file a separate bug against doco and type checking?
st0012 commentedon May 6, 2024
@zenspider Sorry for the delay. I've now cleared other priorities and will start looking at this. For the start I'll target the configs listed here, so feel free to add new ones.
st0012 commentedon May 6, 2024
Actually, I think I'll close this with #953. If you find other configs can use the same improvement, please open new ones 😄
zenspider commentedon May 6, 2024
#953 feels like the right thing to do. Thanks!