<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/test/irb/test_history.rb, branch v3_4_9</title>
<subtitle>The Ruby Programming Language</subtitle>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/'/>
<entry>
<title>[ruby/irb] Load history when starting a direct debug session</title>
<updated>2024-12-12T17:26:06+00:00</updated>
<author>
<name>James Reid-Smith</name>
<email>james.reidsmith@shopify.com</email>
</author>
<published>2024-12-12T17:26:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=c0caf1cc1aaa3ba2e9d09977ee2a51e35114c70f'/>
<id>c0caf1cc1aaa3ba2e9d09977ee2a51e35114c70f</id>
<content type='text'>
(https://github.com/ruby/irb/pull/1046)

* Load history when starting a direct debug session

When starting a debug session directly with RUBY_DEBUG_IRB_CONSOLE=1 and
`require 'debug'; debugger`, IRB's history wasn't loaded. This commit ensures
history is loaded in this case by calling `load_history` when configuring IRB
for the debugger.

Fixes ruby/irb#975

* Update test/irb/test_history.rb

* Update lib/irb/debug.rb

---------

https://github.com/ruby/irb/commit/7f851b5353

Co-authored-by: Stan Lo &lt;stan001212@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
(https://github.com/ruby/irb/pull/1046)

* Load history when starting a direct debug session

When starting a debug session directly with RUBY_DEBUG_IRB_CONSOLE=1 and
`require 'debug'; debugger`, IRB's history wasn't loaded. This commit ensures
history is loaded in this case by calling `load_history` when configuring IRB
for the debugger.

Fixes ruby/irb#975

* Update test/irb/test_history.rb

* Update lib/irb/debug.rb

---------

https://github.com/ruby/irb/commit/7f851b5353

Co-authored-by: Stan Lo &lt;stan001212@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/irb] Improve history test's encoding setting</title>
<updated>2024-10-20T06:18:07+00:00</updated>
<author>
<name>Go</name>
<email>monkeywzr@gmail.com</email>
</author>
<published>2024-10-20T06:18:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=fe17697aac1a68af6c5d34de7093b0fc65d39106'/>
<id>fe17697aac1a68af6c5d34de7093b0fc65d39106</id>
<content type='text'>
(https://github.com/ruby/irb/pull/1022)

* improve history test's encoding setting

* fix missing locale error for ci and refactoring

https://github.com/ruby/irb/commit/7f385bc19b
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
(https://github.com/ruby/irb/pull/1022)

* improve history test's encoding setting

* fix missing locale error for ci and refactoring

https://github.com/ruby/irb/commit/7f385bc19b
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/irb] History refactors (https://github.com/ruby/irb/pull/1013)</title>
<updated>2024-10-11T16:34:19+00:00</updated>
<author>
<name>Gert Goet</name>
<email>gert@thinkcreate.nl</email>
</author>
<published>2024-10-11T16:34:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=eccfb6e60c2dba67ce5b1315a07598c2ba8b1ffb'/>
<id>eccfb6e60c2dba67ce5b1315a07598c2ba8b1ffb</id>
<content type='text'>
* Extract logic save_history in separate helper

* Extract logic history_file in helper

* Allow for readonly history

https://github.com/ruby/irb/commit/52307f9026
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Extract logic save_history in separate helper

* Extract logic history_file in helper

* Allow for readonly history

https://github.com/ruby/irb/commit/52307f9026
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/irb] Use proper locale in history encoding test</title>
<updated>2024-09-24T14:07:47+00:00</updated>
<author>
<name>tomoya ishida</name>
<email>tomoyapenguin@gmail.com</email>
</author>
<published>2024-09-24T14:07:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=07842491c539bf5d0abe29d63380ee5aaf121934'/>
<id>07842491c539bf5d0abe29d63380ee5aaf121934</id>
<content type='text'>
(https://github.com/ruby/irb/pull/1008)

https://github.com/ruby/irb/commit/f6b06a9a40
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
(https://github.com/ruby/irb/pull/1008)

https://github.com/ruby/irb/commit/f6b06a9a40
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/irb] Clear ENV["XDG_CONFIG_HOME"] to avoid loading</title>
<updated>2024-07-18T10:56:19+00:00</updated>
<author>
<name>tomoya ishida</name>
<email>tomoyapenguin@gmail.com</email>
</author>
<published>2024-07-18T10:56:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=c304bf13b55a30b9982f9c9e6187f5b56fc731b0'/>
<id>c304bf13b55a30b9982f9c9e6187f5b56fc731b0</id>
<content type='text'>
user-defined irbrc in TestIRB::ConfigValidationTest
(https://github.com/ruby/irb/pull/982)

https://github.com/ruby/irb/commit/632da0ff29
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
user-defined irbrc in TestIRB::ConfigValidationTest
(https://github.com/ruby/irb/pull/982)

https://github.com/ruby/irb/commit/632da0ff29
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/irb] Fix irb_history saved to current directory</title>
<updated>2024-03-16T15:20:03+00:00</updated>
<author>
<name>tomoya ishida</name>
<email>tomoyapenguin@gmail.com</email>
</author>
<published>2024-03-16T15:19:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=bda5b099375d91274a5314aad2608f8e5b37e891'/>
<id>bda5b099375d91274a5314aad2608f8e5b37e891</id>
<content type='text'>
(https://github.com/ruby/irb/pull/901)

* Always save irb_history in HOME or XDG_CONFIG_HOME

Also split irbrc search logic from irb_history search logic as a refactor

* Remove IRB.conf[:RC_NAME_GENERATOR] because it's not configurable

This conf is used to specify which irbrc to load. Need to configure before irbrc is loaded, so it's actually not configurable.
This conf is also used for history file search, but it is configurable by conf[:HISTORY_FILE].

* remove rc_file_test because it is tested with rc_files, remove useless test setup

* Make internal irbrc searching method private

https://github.com/ruby/irb/commit/11d03a6ff7
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
(https://github.com/ruby/irb/pull/901)

* Always save irb_history in HOME or XDG_CONFIG_HOME

Also split irbrc search logic from irb_history search logic as a refactor

* Remove IRB.conf[:RC_NAME_GENERATOR] because it's not configurable

This conf is used to specify which irbrc to load. Need to configure before irbrc is loaded, so it's actually not configurable.
This conf is also used for history file search, but it is configurable by conf[:HISTORY_FILE].

* remove rc_file_test because it is tested with rc_files, remove useless test setup

* Make internal irbrc searching method private

https://github.com/ruby/irb/commit/11d03a6ff7
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/irb] Clear temporary directories</title>
<updated>2024-03-06T08:28:16+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2024-03-06T08:28:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=0c2e97689495c545b81c142f30d5f7b81b78a184'/>
<id>0c2e97689495c545b81c142f30d5f7b81b78a184</id>
<content type='text'>
(https://github.com/ruby/irb/pull/894)

https://github.com/ruby/irb/commit/dc0dd25a39
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
(https://github.com/ruby/irb/pull/894)

https://github.com/ruby/irb/commit/dc0dd25a39
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/irb] Prevent `irb_history`'s creation during HistoryTest</title>
<updated>2024-03-06T04:12:49+00:00</updated>
<author>
<name>Stan Lo</name>
<email>stan001212@gmail.com</email>
</author>
<published>2024-03-06T04:12:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=97d32bb2fcc6d53ec17c96ea6d826f1f7698aa29'/>
<id>97d32bb2fcc6d53ec17c96ea6d826f1f7698aa29</id>
<content type='text'>
(https://github.com/ruby/irb/pull/893)

Some cases of it currently create `~/.irb_history` files unintentionally
while others don't. This is caused by the varying levels of setup/cleanup between
them. This commit fixes the issue by wrapping every single test inside a
consistent test setup and teardown callbacks.

https://github.com/ruby/irb/commit/a2a3cbb0ef
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
(https://github.com/ruby/irb/pull/893)

Some cases of it currently create `~/.irb_history` files unintentionally
while others don't. This is caused by the varying levels of setup/cleanup between
them. This commit fixes the issue by wrapping every single test inside a
consistent test setup and teardown callbacks.

https://github.com/ruby/irb/commit/a2a3cbb0ef
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/irb] Add the ability to fetch and load multiple irb files.</title>
<updated>2024-03-05T16:07:45+00:00</updated>
<author>
<name>Haroon Ahmed</name>
<email>haroon.ahmed25@gmail.com</email>
</author>
<published>2024-03-05T16:07:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=8f6113a91e6786aaf131942b35ab5b7465f756a0'/>
<id>8f6113a91e6786aaf131942b35ab5b7465f756a0</id>
<content type='text'>
(https://github.com/ruby/irb/pull/859)

This allows hierarchy when loading rc files for example both files below
are loaded;

project/.irbrc
~/.irbrc

https://github.com/ruby/irb/commit/b53ebc6655

Co-authored-by: Stan Lo &lt;stan001212@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
(https://github.com/ruby/irb/pull/859)

This allows hierarchy when loading rc files for example both files below
are loaded;

project/.irbrc
~/.irbrc

https://github.com/ruby/irb/commit/b53ebc6655

Co-authored-by: Stan Lo &lt;stan001212@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/irb] Polish the exit! command and its tests</title>
<updated>2024-02-11T05:17:40+00:00</updated>
<author>
<name>Stan Lo</name>
<email>stan001212@gmail.com</email>
</author>
<published>2024-02-11T05:17:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=5c4657f8832bcbb9e7c3c50b6fe69212a86de153'/>
<id>5c4657f8832bcbb9e7c3c50b6fe69212a86de153</id>
<content type='text'>
(https://github.com/ruby/irb/pull/867)

* Remove IRB.irb_exit! method

It's not necessary to introduce a new method just for the exit! command
at this moment.

* Rename ExitForcedAction to ForceExit

* Move force exit tests to a dedicated file

* Fix nested history saving with exit! command

Because we switched to use `Kernel#exit` instead of `exit!`, the outer
session's ensure block in `Irb#run` will be run, which will save the
history. This means the separate check to save history when force exiting
is no longer necessary.

* execute_lines helper should also capture IRB setup's output

This prevents setup warnings from being printed to test output
while allowing those output to be tested.

* Update readme

https://github.com/ruby/irb/commit/899d10ade1
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
(https://github.com/ruby/irb/pull/867)

* Remove IRB.irb_exit! method

It's not necessary to introduce a new method just for the exit! command
at this moment.

* Rename ExitForcedAction to ForceExit

* Move force exit tests to a dedicated file

* Fix nested history saving with exit! command

Because we switched to use `Kernel#exit` instead of `exit!`, the outer
session's ensure block in `Irb#run` will be run, which will save the
history. This means the separate check to save history when force exiting
is no longer necessary.

* execute_lines helper should also capture IRB setup's output

This prevents setup warnings from being printed to test output
while allowing those output to be tested.

* Update readme

https://github.com/ruby/irb/commit/899d10ade1
</pre>
</div>
</content>
</entry>
</feed>
