<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/lib/irb/cmd, 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] Fix a typo (https://github.com/ruby/irb/pull/912)</title>
<updated>2024-03-26T11:30:33+00:00</updated>
<author>
<name>Hiroshi SHIBATA</name>
<email>hsbt@ruby-lang.org</email>
</author>
<published>2024-03-26T11:30:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=8cfa8e87b2705fb356bbbb9ef719b5c5a54f9862'/>
<id>8cfa8e87b2705fb356bbbb9ef719b5c5a54f9862</id>
<content type='text'>
https://github.com/ruby/irb/commit/2057248e40
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/irb/commit/2057248e40
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/irb] Standardize command related names</title>
<updated>2024-02-16T16:47:36+00:00</updated>
<author>
<name>Stan Lo</name>
<email>stan001212@gmail.com</email>
</author>
<published>2024-02-16T16:47:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=f5801e2bf404cbb0f673a6ebb040b0ba6cd01b77'/>
<id>f5801e2bf404cbb0f673a6ebb040b0ba6cd01b77</id>
<content type='text'>
(https://github.com/ruby/irb/pull/873)

* Replace ExtendCommand with Command and standardize command related names

1. Rename lib/irb/extend-command.rb to lib/irb/command.rb
2. Rename lib/irb/cmd/*.rb to lib/irb/command/*.rb
3. Rename test/irb/test_cmd.rb to test/irb/test_command.rb
4. Rename ExtendCommand to Command

* Alias ExtendCommand to Command and deprecate it

* Rename Command::Nop to Command::Base

* Not deprecate old constants just yet

* Add lib/irb/cmd/nop.rb back

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

* Replace ExtendCommand with Command and standardize command related names

1. Rename lib/irb/extend-command.rb to lib/irb/command.rb
2. Rename lib/irb/cmd/*.rb to lib/irb/command/*.rb
3. Rename test/irb/test_cmd.rb to test/irb/test_command.rb
4. Rename ExtendCommand to Command

* Alias ExtendCommand to Command and deprecate it

* Rename Command::Nop to Command::Base

* Not deprecate old constants just yet

* Add lib/irb/cmd/nop.rb back

https://github.com/ruby/irb/commit/462c1284af
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/irb] Repurpose the help command to display the help message</title>
<updated>2024-02-14T13:47:45+00:00</updated>
<author>
<name>Stan Lo</name>
<email>stan001212@gmail.com</email>
</author>
<published>2024-02-14T13:47:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=c84581f1d920a6f179d13c0edd99f5b99dd5d1ba'/>
<id>c84581f1d920a6f179d13c0edd99f5b99dd5d1ba</id>
<content type='text'>
(https://github.com/ruby/irb/pull/872)

See #787 for more details.

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

See #787 for more details.

https://github.com/ruby/irb/commit/d9192d92d0
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/irb] Fix SourceFinder's constant evaluation issue</title>
<updated>2024-02-13T13:36:32+00:00</updated>
<author>
<name>Stan Lo</name>
<email>stan001212@gmail.com</email>
</author>
<published>2024-02-13T13:36:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=2f0f95235a1de489f50c7a9dbe3477f9f7e60cd1'/>
<id>2f0f95235a1de489f50c7a9dbe3477f9f7e60cd1</id>
<content type='text'>
(https://github.com/ruby/irb/pull/869)

Currently, if the signature's constant part is not defined, a NameError
would be raised.

```
irb(main):001&gt; show_source Foo
(eval):1:in `&lt;top (required)&gt;': uninitialized constant Foo (NameError)

Foo
^^^
        from (irb):1:in `&lt;main&gt;'
```

This commit fixes the issue and simplifies the `edit` command's implementation.

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

Currently, if the signature's constant part is not defined, a NameError
would be raised.

```
irb(main):001&gt; show_source Foo
(eval):1:in `&lt;top (required)&gt;': uninitialized constant Foo (NameError)

Foo
^^^
        from (irb):1:in `&lt;main&gt;'
```

This commit fixes the issue and simplifies the `edit` command's implementation.

https://github.com/ruby/irb/commit/8c16e029d1
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/irb] Powerup show_source by enabling RubyVM.keep_script_lines</title>
<updated>2024-02-12T18:38:30+00:00</updated>
<author>
<name>tomoya ishida</name>
<email>tomoyapenguin@gmail.com</email>
</author>
<published>2024-02-12T18:38:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=7af97dc71fd6790a3f4ffe47dcc5720b675f6b6b'/>
<id>7af97dc71fd6790a3f4ffe47dcc5720b675f6b6b</id>
<content type='text'>
(https://github.com/ruby/irb/pull/862)

* Powerup show_source by enabling RubyVM.keep_script_lines

* Add file_content field to avoid reading file twice while show_source

* Change path passed to eval, don't change irb_path.

* Encapsulate source coloring logic and binary file check insode class Source

* Add edit command testcase when irb_path does not exist

* Memoize irb_path existence to reduce file existence check calculating eval_path

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

* Powerup show_source by enabling RubyVM.keep_script_lines

* Add file_content field to avoid reading file twice while show_source

* Change path passed to eval, don't change irb_path.

* Encapsulate source coloring logic and binary file check insode class Source

* Add edit command testcase when irb_path does not exist

* Memoize irb_path existence to reduce file existence check calculating eval_path

https://github.com/ruby/irb/commit/239683a937
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/irb] Fix exit! command warning and method behavior</title>
<updated>2024-02-12T11:28:54+00:00</updated>
<author>
<name>tomoya ishida</name>
<email>tomoyapenguin@gmail.com</email>
</author>
<published>2024-02-12T11:28:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=06995eb45b86645a945b4429c6d85597a21b40a7'/>
<id>06995eb45b86645a945b4429c6d85597a21b40a7</id>
<content type='text'>
(https://github.com/ruby/irb/pull/868)

* Fix exit! command warning and method behavior

* Remove arg(0) from Kernel.exit and Kernel.exit!

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

* Fix exit! command warning and method behavior

* Remove arg(0) from Kernel.exit and Kernel.exit!

https://github.com/ruby/irb/commit/372bc59bf5
</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>
<entry>
<title>[ruby/irb] Introduce exit! command</title>
<updated>2024-02-10T22:07:53+00:00</updated>
<author>
<name>Ignacio Chiazzo Cardarello</name>
<email>ignaciochiazzo@gmail.com</email>
</author>
<published>2024-02-10T22:07:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=429eeb09f25bd1bd3f64f70c6ef409bedd3c6c1f'/>
<id>429eeb09f25bd1bd3f64f70c6ef409bedd3c6c1f</id>
<content type='text'>
(https://github.com/ruby/irb/pull/851)

* Added failing test for when writing history on exit

* Save history on exit

* Exit early when calling Kernel.exit

* use status 0 for kernel.exit

* Added test for nested sessions

* Update lib/irb.rb

---------

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

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

* Added failing test for when writing history on exit

* Save history on exit

* Exit early when calling Kernel.exit

* use status 0 for kernel.exit

* Added test for nested sessions

* Update lib/irb.rb

---------

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

Co-authored-by: Stan Lo &lt;stan001212@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/irb] Refactor exit command</title>
<updated>2024-01-06T17:15:16+00:00</updated>
<author>
<name>Stan Lo</name>
<email>stan001212@gmail.com</email>
</author>
<published>2024-01-06T17:15:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=4bdfc9070cf626db4553a6cd15dbae19604180cf'/>
<id>4bdfc9070cf626db4553a6cd15dbae19604180cf</id>
<content type='text'>
(https://github.com/ruby/irb/pull/835)

* Remove unnecessary code from the exit command's implementation

1. The parameters of `IRB.irb_exit` were never used. But there are some
   libraries seem to call it with arguments + it's declared on the top-level
   IRB constant. So I changed the params to anonymous splat instead of removing them.
2. `Context#exit` was completely unnecessary as `IRB.irb_exit` doesn't use
   the `@irb` instance it passes. And since it's (or should be treated as)
   a private method, I simply removed it.
3. The `exit` command doesn't use the status argument it receives at all.
   But to avoid raising errors on usages like `exit 1`, I changed the argument to
   anonymous splat instead removing it.

* Make exit an actual command

* Update readme

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

* Remove unnecessary code from the exit command's implementation

1. The parameters of `IRB.irb_exit` were never used. But there are some
   libraries seem to call it with arguments + it's declared on the top-level
   IRB constant. So I changed the params to anonymous splat instead of removing them.
2. `Context#exit` was completely unnecessary as `IRB.irb_exit` doesn't use
   the `@irb` instance it passes. And since it's (or should be treated as)
   a private method, I simply removed it.
3. The `exit` command doesn't use the status argument it receives at all.
   But to avoid raising errors on usages like `exit 1`, I changed the argument to
   anonymous splat instead removing it.

* Make exit an actual command

* Update readme

https://github.com/ruby/irb/commit/452b543a65
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/irb] Warn and do nothing if block is passed to measure command</title>
<updated>2023-12-13T11:06:26+00:00</updated>
<author>
<name>tomoya ishida</name>
<email>tomoyapenguin@gmail.com</email>
</author>
<published>2023-12-13T11:06:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=745ab3e4c748ebf3b22278d7ad33c7abcf1f6016'/>
<id>745ab3e4c748ebf3b22278d7ad33c7abcf1f6016</id>
<content type='text'>
(https://github.com/ruby/irb/pull/813)

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

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