<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/lib/irb/history.rb, branch ruby_3_4</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] Remove bignum check from save_history</title>
<updated>2024-10-13T13:00:20+00:00</updated>
<author>
<name>tomoya ishida</name>
<email>tomoyapenguin@gmail.com</email>
</author>
<published>2024-10-13T13:00:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=cf8388f76c4c2ff2f46d0d2aa2cf5186e05ff606'/>
<id>cf8388f76c4c2ff2f46d0d2aa2cf5186e05ff606</id>
<content type='text'>
(https://github.com/ruby/irb/pull/1018)

IRB need to accept bignum history size, but we don't want explicit bignum checks because threshold of bignum and fixnum depends on platform.

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

IRB need to accept bignum history size, but we don't want explicit bignum checks because threshold of bignum and fixnum depends on platform.

https://github.com/ruby/irb/commit/5151467e6a
</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] 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] 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] Require pathname (https://github.com/ruby/irb/pull/860)</title>
<updated>2024-02-02T22:25:33+00:00</updated>
<author>
<name>Stan Lo</name>
<email>stan001212@gmail.com</email>
</author>
<published>2024-02-02T22:25:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=5d646fa136131c18a7a432486c65438abe9790e2'/>
<id>5d646fa136131c18a7a432486c65438abe9790e2</id>
<content type='text'>
https://github.com/ruby/irb/commit/0ab96ed426
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/irb/commit/0ab96ed426
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/irb] Add a warning for when the history path doesn't exist</title>
<updated>2024-02-02T21:58:22+00:00</updated>
<author>
<name>Ignacio Chiazzo Cardarello</name>
<email>ignaciochiazzo@gmail.com</email>
</author>
<published>2024-02-02T21:58:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=aa780a678e98599fdd9011760dabe17f9e26826c'/>
<id>aa780a678e98599fdd9011760dabe17f9e26826c</id>
<content type='text'>
(https://github.com/ruby/irb/pull/852)

* Add a warning for when the history path doesn't exist

* warn when the directory does not exist

* added test for when the history_file does not exist

* Update lib/irb/history.rb

---------

https://github.com/ruby/irb/commit/9e6fa67212

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/852)

* Add a warning for when the history path doesn't exist

* warn when the directory does not exist

* added test for when the history_file does not exist

* Update lib/irb/history.rb

---------

https://github.com/ruby/irb/commit/9e6fa67212

Co-authored-by: Stan Lo &lt;stan001212@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/irb] Reset history counter even when @loaded_history_lines is</title>
<updated>2024-02-01T16:19:07+00:00</updated>
<author>
<name>Stan Lo</name>
<email>stan001212@gmail.com</email>
</author>
<published>2024-02-01T16:19:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=f36c61d27fcdc47d4aa34e8a3b52590aac08bb69'/>
<id>f36c61d27fcdc47d4aa34e8a3b52590aac08bb69</id>
<content type='text'>
not defined
(https://github.com/ruby/irb/pull/853)

The issue (https://github.com/ruby/debug/issues/1064) is caused by a
combination of factors:

1. When user starts an IRB session without a history file, the
   `@loaded_history_lines` ivar is not defined.
2. If the user then starts the `irb:rdbg` session, the history counter
   is not set, because the `@loaded_history_lines` is not defined.
3. Because `irb:rdbg` saves the history before passing Ruby expression
   to the debugger, it saves the history with duplicated lines. The number
   grows in exponential order.
4. When the user exits the `irb:rdbg` session, the history file could be
   bloated with duplicated lines.

This commit fixes the issue by resetting the history counter even when
`@loaded_history_lines` is not defined.

https://github.com/ruby/irb/commit/4afc98c258
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
not defined
(https://github.com/ruby/irb/pull/853)

The issue (https://github.com/ruby/debug/issues/1064) is caused by a
combination of factors:

1. When user starts an IRB session without a history file, the
   `@loaded_history_lines` ivar is not defined.
2. If the user then starts the `irb:rdbg` session, the history counter
   is not set, because the `@loaded_history_lines` is not defined.
3. Because `irb:rdbg` saves the history before passing Ruby expression
   to the debugger, it saves the history with duplicated lines. The number
   grows in exponential order.
4. When the user exits the `irb:rdbg` session, the history file could be
   bloated with duplicated lines.

This commit fixes the issue by resetting the history counter even when
`@loaded_history_lines` is not defined.

https://github.com/ruby/irb/commit/4afc98c258
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/irb] inifinity ==&gt; infinity</title>
<updated>2024-01-25T09:58:15+00:00</updated>
<author>
<name>ydah</name>
<email>13041216+ydah@users.noreply.github.com</email>
</author>
<published>2024-01-25T02:26:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=6580a95f8d5a74bec20d41eb9660a93f13be8922'/>
<id>6580a95f8d5a74bec20d41eb9660a93f13be8922</id>
<content type='text'>
https://github.com/ruby/irb/commit/78dea58000
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/irb/commit/78dea58000
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/irb] Scrub past history input before split</title>
<updated>2023-12-01T18:04:03+00:00</updated>
<author>
<name>hogelog</name>
<email>konbu.komuro@gmail.com</email>
</author>
<published>2023-12-01T18:03:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=ef466ac931dcb37f98fc89eba526c2593e1cddb0'/>
<id>ef466ac931dcb37f98fc89eba526c2593e1cddb0</id>
<content type='text'>
(https://github.com/ruby/irb/pull/795)

* Scrub past history input before split

* Don't rewrite ENV["LANG"]

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

* Scrub past history input before split

* Don't rewrite ENV["LANG"]

https://github.com/ruby/irb/commit/0f344f66d9
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/irb] Handle Concurrent Sessions and Saving Readline::HISTORY</title>
<updated>2023-09-16T12:48:32+00:00</updated>
<author>
<name>Chad Schroeder</name>
<email>chadrschroeder@users.noreply.github.com</email>
</author>
<published>2023-09-16T12:48:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=a8afedce6dfdbab8807134daa926b0936b5cd9a4'/>
<id>a8afedce6dfdbab8807134daa926b0936b5cd9a4</id>
<content type='text'>
(https://github.com/ruby/irb/pull/651)

* handle concurrent sessions and saving Readline::HISTORY, fixes https://github.com/ruby/irb/pull/510

* separate tests

* don't mutate the HISTORY object on the class

* avoid repeated .to_i calls

* remove intermediary history array

* work with array, fix test comment

---------

https://github.com/ruby/irb/commit/1681ada328

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/651)

* handle concurrent sessions and saving Readline::HISTORY, fixes https://github.com/ruby/irb/pull/510

* separate tests

* don't mutate the HISTORY object on the class

* avoid repeated .to_i calls

* remove intermediary history array

* work with array, fix test comment

---------

https://github.com/ruby/irb/commit/1681ada328

Co-authored-by: Stan Lo &lt;stan001212@gmail.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
