From 473d2d750980c604573b309e3099491542543791 Mon Sep 17 00:00:00 2001 From: dishu305 Date: Sun, 25 Oct 2026 13:55:00 +0000 Subject: [PATCH] docs: update Ruby version and fix grammar in README test: add coverage for SAVE_HISTORY=0 edge case --- README.md | 4 ++-- test/irb/test_history.rb | 19 +++++++++++++++++++ 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b08ba26ca..d9c9b5b35 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ The `irb` command from your shell will start the interpreter. > > IRB is a default gem of Ruby so you shouldn't need to install it separately. > -> But if you're using Ruby 2.6 or later and want to upgrade/install a specific version of IRB, please follow these steps. +> But if you're using Ruby 3.0 or later and want to upgrade/install a specific version of IRB, please follow these steps. To install it with `bundler`, add this line to your application's Gemfile: @@ -105,7 +105,7 @@ See the [Configuration page](https://ruby.github.io/irb/Configurations_md.html) ## Extending IRB -IRB `v1.13.0` and later versions allows users/libraries to extend its functionality through official APIs. +IRB `v1.13.0` and later versions allow users/libraries to extend its functionality through official APIs. For more information, please visit the [IRB Extension Guide](https://ruby.github.io/irb/EXTEND_IRB_md.html). diff --git a/test/irb/test_history.rb b/test/irb/test_history.rb index e600c74cb..f3374849f 100644 --- a/test/irb/test_history.rb +++ b/test/irb/test_history.rb @@ -43,6 +43,25 @@ def test_history_dont_save INPUT end + def test_history_save_0 + omit "Skip Editline" if /EditLine/n.match(Readline::VERSION) + IRB.conf[:SAVE_HISTORY] = 0 + assert_history(<<~EXPECTED_HISTORY, <<~INITIAL_HISTORY, <<~INPUT) + 1 + 2 + 3 + 4 + EXPECTED_HISTORY + 1 + 2 + 3 + 4 + INITIAL_HISTORY + 5 + exit + INPUT + end + def test_history_save_1 omit "Skip Editline" if /EditLine/n.match(Readline::VERSION) IRB.conf[:SAVE_HISTORY] = 1