<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/lib/irb/color.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] Add black and white color to IRB::Color</title>
<updated>2023-08-11T16:03:11+00:00</updated>
<author>
<name>Stan Lo</name>
<email>stan001212@gmail.com</email>
</author>
<published>2023-08-11T16:03:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=d3311e5cc3f4606afc9a12e4a4c7e1a19bd722d0'/>
<id>d3311e5cc3f4606afc9a12e4a4c7e1a19bd722d0</id>
<content type='text'>
(https://github.com/ruby/irb/pull/676)

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

https://github.com/ruby/irb/commit/a2763acade
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/irb] Drop Ruby 2.6 support</title>
<updated>2023-04-05T21:40:40+00:00</updated>
<author>
<name>Stan Lo</name>
<email>stan001212@gmail.com</email>
</author>
<published>2023-04-05T21:40:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=2f8e5c80e65a14b3a9298b6cae7ee7fc53890540'/>
<id>2f8e5c80e65a14b3a9298b6cae7ee7fc53890540</id>
<content type='text'>
(https://github.com/ruby/irb/pull/555)

* Remove all Ruby 2.6 support

* Drop Ruby 2.6 specific testing conditions

* Only run Ruby 2.7+ on CI

* Bump Ruby requirement to 2.7+

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

* Remove all Ruby 2.6 support

* Drop Ruby 2.6 specific testing conditions

* Only run Ruby 2.7+ on CI

* Bump Ruby requirement to 2.7+

https://github.com/ruby/irb/commit/3f714b616c
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/irb] Fix colorize backtick symbol</title>
<updated>2023-02-12T20:27:32+00:00</updated>
<author>
<name>tomoya ishida</name>
<email>tomoyapenguin@gmail.com</email>
</author>
<published>2023-02-12T20:27:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=f313514563853f1ee623135c2959df2b518ee755'/>
<id>f313514563853f1ee623135c2959df2b518ee755</id>
<content type='text'>
(https://github.com/ruby/irb/pull/508)

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

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

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

Co-authored-by: Stan Lo &lt;stan001212@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/irb] Assert lvars_code doesn't include \n</title>
<updated>2022-10-18T06:03:23+00:00</updated>
<author>
<name>Takashi Kokubun</name>
<email>takashikkbn@gmail.com</email>
</author>
<published>2022-10-18T06:00:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=931bcd1b6315de5407a73019482bd3919f16820d'/>
<id>931bcd1b6315de5407a73019482bd3919f16820d</id>
<content type='text'>
Removing /\A.+\n/ could have an unexpected impact, depending on how
RubyLex.generate_local_variables_assign_code is implemented. It feels
like a too much assumption and the intention isn't immediately clear,
so I added these changes.

https://github.com/ruby/irb/commit/ccc07a35ce
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Removing /\A.+\n/ could have an unexpected impact, depending on how
RubyLex.generate_local_variables_assign_code is implemented. It feels
like a too much assumption and the intention isn't immediately clear,
so I added these changes.

https://github.com/ruby/irb/commit/ccc07a35ce
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/irb] Always use local variables in current context to parse code (https://github.com/ruby/irb/pull/397)</title>
<updated>2022-10-18T05:44:07+00:00</updated>
<author>
<name>tomoya ishida</name>
<email>tomoyapenguin@gmail.com</email>
</author>
<published>2022-10-18T05:44:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=a09f764ce52838a363b006ea434287eca431dbae'/>
<id>a09f764ce52838a363b006ea434287eca431dbae</id>
<content type='text'>
* Use local_variables for colorize, code_block_open check, nesting_level and assignment_expression check

* Check if expression is an assignment BEFORE evaluating it. evaluate might define new localvars and change result of assignment_expression?

* Add local_variables dependent code test

* pend local variable dependent test on truffleruby

code_block_open is not working on truffleruby

* Always pass context to RubyLex#lex

* Rename local_variable_assign_code generator method name

* Add assignment expression truncate test

* Add Context#local_variables and make generate_local_variables_assign_code more simple

* Update lib/irb/input-method.rb

Co-authored-by: Stan Lo &lt;stan001212@gmail.com&gt;

* Add a comment why assignment expression check should be done before evaluate

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

Co-authored-by: Stan Lo &lt;stan001212@gmail.com&gt;
Co-authored-by: Takashi Kokubun &lt;takashikkbn@gmail.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Use local_variables for colorize, code_block_open check, nesting_level and assignment_expression check

* Check if expression is an assignment BEFORE evaluating it. evaluate might define new localvars and change result of assignment_expression?

* Add local_variables dependent code test

* pend local variable dependent test on truffleruby

code_block_open is not working on truffleruby

* Always pass context to RubyLex#lex

* Rename local_variable_assign_code generator method name

* Add assignment expression truncate test

* Add Context#local_variables and make generate_local_variables_assign_code more simple

* Update lib/irb/input-method.rb

Co-authored-by: Stan Lo &lt;stan001212@gmail.com&gt;

* Add a comment why assignment expression check should be done before evaluate

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

Co-authored-by: Stan Lo &lt;stan001212@gmail.com&gt;
Co-authored-by: Takashi Kokubun &lt;takashikkbn@gmail.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/irb] Rewrite on_scan proc to be more readable.</title>
<updated>2022-09-21T15:37:40+00:00</updated>
<author>
<name>tompng</name>
<email>tomoyapenguin@gmail.com</email>
</author>
<published>2022-09-19T05:14:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=369f1668cd9dd4f361d9082bb729aa510835126b'/>
<id>369f1668cd9dd4f361d9082bb729aa510835126b</id>
<content type='text'>
https://github.com/ruby/irb/commit/da54e7f081
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/irb/commit/da54e7f081
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/irb] Scan every single characters in IRB::Color.scan</title>
<updated>2022-09-21T15:37:38+00:00</updated>
<author>
<name>tompng</name>
<email>tomoyapenguin@gmail.com</email>
</author>
<published>2022-08-07T11:58:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=9f686878794291b088d07866c00f8056a0c7dec7'/>
<id>9f686878794291b088d07866c00f8056a0c7dec7</id>
<content type='text'>
https://github.com/ruby/irb/commit/d14e56a65d
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/irb/commit/d14e56a65d
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/irb] Color.colorable? needs to consider the condition when irb is not loaded</title>
<updated>2022-06-28T13:57:17+00:00</updated>
<author>
<name>st0012</name>
<email>stan001212@gmail.com</email>
</author>
<published>2022-06-28T13:47:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=7d211c93af2253c5f5a4eb988a362f3220965980'/>
<id>7d211c93af2253c5f5a4eb988a362f3220965980</id>
<content type='text'>
ruby/debug uses `irb/color` selectively:
https://github.com/ruby/debug/blob/0ac22406bb8f65bc76f9f5576a00c729cac693af/lib/debug/color.rb#L4

And in that case, `IRB.conf` won't be defined. So Color.colorable? needs
to consider that.

This also fixes the Ruby trunk CI.

https://github.com/ruby/irb/commit/b2cd07e795
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
ruby/debug uses `irb/color` selectively:
https://github.com/ruby/debug/blob/0ac22406bb8f65bc76f9f5576a00c729cac693af/lib/debug/color.rb#L4

And in that case, `IRB.conf` won't be defined. So Color.colorable? needs
to consider that.

This also fixes the Ruby trunk CI.

https://github.com/ruby/irb/commit/b2cd07e795
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/irb] Centralize coloring control (https://github.com/ruby/irb/pull/374)</title>
<updated>2022-06-28T13:30:42+00:00</updated>
<author>
<name>Stan Lo</name>
<email>stan001212@gmail.com</email>
</author>
<published>2022-06-28T13:30:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=44c1316293f80abaa0e76b3818322544b9372a97'/>
<id>44c1316293f80abaa0e76b3818322544b9372a97</id>
<content type='text'>
* Use colorable: argument as the only coloring control

* Centalize color controling logic at Color.colorable?

There are 2 requirements for coloring output:

1. It's supported on the platform
2. The user wants it: `IRB.conf[:USE_COLORIZE] == true`

Right now we check 1 and 2 separately whenever we colorize things.
But it's error-prone because while 1 is the default of `colorable`
parameter, 2 always need to manually checked. When 2 is overlooked, it
causes issues like https://github.com/ruby/irb/pull/362

And there's 0 case where we may want to colorize even when the user
disables it. So I think we should merge 2 into `Color.colorable?` so it
can be automatically picked up.

* Add tests for all inspect modes

* Simplify inspectors' coloring logic

* Replace use_colorize? with Color.colorable?

* Remove Context#use_colorize cause it's redundant

https://github.com/ruby/irb/commit/1c53023ac4
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Use colorable: argument as the only coloring control

* Centalize color controling logic at Color.colorable?

There are 2 requirements for coloring output:

1. It's supported on the platform
2. The user wants it: `IRB.conf[:USE_COLORIZE] == true`

Right now we check 1 and 2 separately whenever we colorize things.
But it's error-prone because while 1 is the default of `colorable`
parameter, 2 always need to manually checked. When 2 is overlooked, it
causes issues like https://github.com/ruby/irb/pull/362

And there's 0 case where we may want to colorize even when the user
disables it. So I think we should merge 2 into `Color.colorable?` so it
can be automatically picked up.

* Add tests for all inspect modes

* Simplify inspectors' coloring logic

* Replace use_colorize? with Color.colorable?

* Remove Context#use_colorize cause it's redundant

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