Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down Expand Up @@ -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).

Expand Down
19 changes: 19 additions & 0 deletions test/irb/test_history.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading