Bird
0
0

You wrote this in your ~/.irbrc file:

medium📝 Debug Q14 of 15
Ruby - Ecosystem and Best Practices
You wrote this in your ~/.irbrc file:
IRB.conf[:SAVE_HISTORY] = '1000'

But IRB does not save history as expected. What is the problem?
AThe key <code>:SAVE_HISTORY</code> is invalid
BThe value should be an integer, not a string
CIRB does not support saving history
DYou must restart the computer for changes to apply
Step-by-Step Solution
Solution:
  1. Step 1: Check the data type of the value

    :SAVE_HISTORY expects an integer number, not a string.
  2. Step 2: Identify the error cause

    Using a string like '1000' causes IRB to ignore the setting, so history is not saved.
  3. Final Answer:

    The value should be an integer, not a string -> Option B
  4. Quick Check:

    Integer value needed for history count [OK]
Quick Trick: Use numbers, not strings, for numeric IRB config values [OK]
Common Mistakes:
  • Using quotes around numbers
  • Thinking IRB can't save history
  • Believing a full restart is needed

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Ruby Quizzes