<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/lib/irb/ruby-lex.rb, branch v3_3_11</title>
<subtitle>The Ruby Programming Language</subtitle>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/'/>
<entry>
<title>[Bug #20511] Update reline-0.5.7 (#10848)</title>
<updated>2024-05-28T22:54:39+00:00</updated>
<author>
<name>Hiroshi SHIBATA</name>
<email>hsbt@ruby-lang.org</email>
</author>
<published>2024-05-28T22:54:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=077558ee2b8dd3ed414b78384f21118f833eb259'/>
<id>077558ee2b8dd3ed414b78384f21118f833eb259</id>
<content type='text'>
* Update reline-0.5.7

* Update irb-1.13.1</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Update reline-0.5.7

* Update irb-1.13.1</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/irb] Decouple RubyLex from prompt and line_no</title>
<updated>2023-10-12T12:53:31+00:00</updated>
<author>
<name>tomoya ishida</name>
<email>tomoyapenguin@gmail.com</email>
</author>
<published>2023-10-12T12:53:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=e029375a7dc59897931fd3cfe334ffd4864f5049'/>
<id>e029375a7dc59897931fd3cfe334ffd4864f5049</id>
<content type='text'>
(https://github.com/ruby/irb/pull/701)

* Remove instance variable prompt and line_no from RubyLex

* Fix prompt test

* Rename prompt generating method and make it private

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

* Remove instance variable prompt and line_no from RubyLex

* Fix prompt test

* Rename prompt generating method and make it private

https://github.com/ruby/irb/commit/1ceb97fe2e
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/irb] Clear all context usages in RubyLex</title>
<updated>2023-10-04T12:13:33+00:00</updated>
<author>
<name>Stan Lo</name>
<email>stan001212@gmail.com</email>
</author>
<published>2023-10-04T12:13:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=b43cc51dcad9859ea6c54cb4f03105c8511582de'/>
<id>b43cc51dcad9859ea6c54cb4f03105c8511582de</id>
<content type='text'>
(https://github.com/ruby/irb/pull/684)

After this change, `RubyLex` will not interact with `Context` directly
in any way. This decoupling has a few benefits:

- It makes `RubyLex` easier to test as it no longer has a dependency on
  `Context`. We can see this from the removal of `build_context` from
  `test_ruby_lex.rb`.
- It will make `RubyLex` easier to understand as it will not be affected
  by state changes in `Context` objects.
- It allows `RubyLex` to be used in places where `Context` is not available.

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

After this change, `RubyLex` will not interact with `Context` directly
in any way. This decoupling has a few benefits:

- It makes `RubyLex` easier to test as it no longer has a dependency on
  `Context`. We can see this from the removal of `build_context` from
  `test_ruby_lex.rb`.
- It will make `RubyLex` easier to understand as it will not be affected
  by state changes in `Context` objects.
- It allows `RubyLex` to be used in places where `Context` is not available.

https://github.com/ruby/irb/commit/d5b262a076
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/irb] Deprecate RubyLex and warn about referencing to it</title>
<updated>2023-08-24T15:35:40+00:00</updated>
<author>
<name>Stan Lo</name>
<email>stan001212@gmail.com</email>
</author>
<published>2023-08-24T15:35:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=e1d7066a5f612c3f6977443d2b574dab67041ad6'/>
<id>e1d7066a5f612c3f6977443d2b574dab67041ad6</id>
<content type='text'>
(https://github.com/ruby/irb/pull/692)

`RubyLex` has always been a private component of IRB, so we should
explicitly discourage usages of it.
Also, it should be placed under the `IRB` module like other components.

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

`RubyLex` has always been a private component of IRB, so we should
explicitly discourage usages of it.
Also, it should be placed under the `IRB` module like other components.

https://github.com/ruby/irb/commit/069b5625f7
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/irb] Move input processing out of RubyLex</title>
<updated>2023-08-21T15:42:15+00:00</updated>
<author>
<name>Stan Lo</name>
<email>stan001212@gmail.com</email>
</author>
<published>2023-08-21T15:42:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=86ac17efde6cf98903513cac2538b15fc4ac80b2'/>
<id>86ac17efde6cf98903513cac2538b15fc4ac80b2</id>
<content type='text'>
(https://github.com/ruby/irb/pull/683)

* Add a test case for Ctrl-C handling

* Test symbol aliases with integration tests

There are a few places that also need to check symbol aliases before
`Irb#eval_input`. But since the current command test skip them, we
don't have test coverage on them.

* Move each_top_level_statement and readmultiline to Irb

This will save RubyLex from knowning information about commands and aliases.

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

* Add a test case for Ctrl-C handling

* Test symbol aliases with integration tests

There are a few places that also need to check symbol aliases before
`Irb#eval_input`. But since the current command test skip them, we
don't have test coverage on them.

* Move each_top_level_statement and readmultiline to Irb

This will save RubyLex from knowning information about commands and aliases.

https://github.com/ruby/irb/commit/69cb5b5615
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/irb] Encapsulate input details in Statement objects</title>
<updated>2023-08-16T10:13:46+00:00</updated>
<author>
<name>Stan Lo</name>
<email>stan001212@gmail.com</email>
</author>
<published>2023-08-16T10:13:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=5a40f7db54dfcc7dadb75dde32c25b88c78d6a85'/>
<id>5a40f7db54dfcc7dadb75dde32c25b88c78d6a85</id>
<content type='text'>
(https://github.com/ruby/irb/pull/682)

* Introduce Statement class

* Split Statement class for better clarity

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

* Introduce Statement class

* Split Statement class for better clarity

https://github.com/ruby/irb/commit/65e8e68690
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/irb] Support seamless integration with ruby/debug</title>
<updated>2023-08-13T18:30:34+00:00</updated>
<author>
<name>Stan Lo</name>
<email>stan001212@gmail.com</email>
</author>
<published>2023-08-13T18:30:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=7f8f62c93bf3d11a0321fa91823065a2ff36f6d0'/>
<id>7f8f62c93bf3d11a0321fa91823065a2ff36f6d0</id>
<content type='text'>
(https://github.com/ruby/irb/pull/575)

* Support native integration with ruby/debug

* Prevent using multi-irb and activating debugger at the same time

Multi-irb makes a few assumptions:

- IRB will manage all threads that host sub-irb sessions
- All IRB sessions will be run on the threads created by IRB itself

However, when using the debugger these assumptions are broken:

- `debug` will freeze ALL threads when it suspends the session (e.g. when
  hitting a breakpoint, or performing step-debugging).
- Since the irb-debug integration runs IRB as the debugger's interface,
  it will be run on the debugger's thread, which is not managed by IRB.

So we should prevent the 2 features from being used at the same time.
To do that, we check if the other feature is already activated when
executing the commands that would activate the other feature.

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

* Support native integration with ruby/debug

* Prevent using multi-irb and activating debugger at the same time

Multi-irb makes a few assumptions:

- IRB will manage all threads that host sub-irb sessions
- All IRB sessions will be run on the threads created by IRB itself

However, when using the debugger these assumptions are broken:

- `debug` will freeze ALL threads when it suspends the session (e.g. when
  hitting a breakpoint, or performing step-debugging).
- Since the irb-debug integration runs IRB as the debugger's interface,
  it will be run on the debugger's thread, which is not managed by IRB.

So we should prevent the 2 features from being used at the same time.
To do that, we check if the other feature is already activated when
executing the commands that would activate the other feature.

https://github.com/ruby/irb/commit/d8fb3246be
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/irb] Move IO configuration to IRB::Irb</title>
<updated>2023-08-13T15:23:04+00:00</updated>
<author>
<name>Stan Lo</name>
<email>stan001212@gmail.com</email>
</author>
<published>2023-08-13T15:23:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=9099d62ac77cdca548bc4110e2cb03057ef0ac8f'/>
<id>9099d62ac77cdca548bc4110e2cb03057ef0ac8f</id>
<content type='text'>
(https://github.com/ruby/irb/pull/681)

It shouldn't be `RubyLex`'s responsibility to handle IO. So this moves
the configuration to `IRB::Irb`.

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

It shouldn't be `RubyLex`'s responsibility to handle IO. So this moves
the configuration to `IRB::Irb`.

https://github.com/ruby/irb/commit/daff750076
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/irb] Remove needless removal of trailing whitespace in</title>
<updated>2023-08-11T18:51:25+00:00</updated>
<author>
<name>tomoya ishida</name>
<email>tomoyapenguin@gmail.com</email>
</author>
<published>2023-08-11T18:51:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=d42891079f6eac5e086c246b0a937ab44fa11823'/>
<id>d42891079f6eac5e086c246b0a937ab44fa11823</id>
<content type='text'>
check_code_state
(https://github.com/ruby/irb/pull/678)

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

https://github.com/ruby/irb/commit/4a6af7d1ed
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/irb] Move assignment check to RubyLex</title>
<updated>2023-08-11T18:44:52+00:00</updated>
<author>
<name>Stan Lo</name>
<email>stan001212@gmail.com</email>
</author>
<published>2023-08-11T18:44:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=0781e55206d94079c15ab315fc082f49bf8bf780'/>
<id>0781e55206d94079c15ab315fc082f49bf8bf780</id>
<content type='text'>
(https://github.com/ruby/irb/pull/670)

Since assignment check relies on tokenization with `Ripper`, it feels like
the responsibility of `RubyLex`. `Irb#eval_input` should simply get the result
when calling `each_top_level_statement` on `RubyLex`.

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

Since assignment check relies on tokenization with `Ripper`, it feels like
the responsibility of `RubyLex`. `Irb#eval_input` should simply get the result
when calling `each_top_level_statement` on `RubyLex`.

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