<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/test/irb/test_context.rb, branch v3_2_11</title>
<subtitle>The Ruby Programming Language</subtitle>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/'/>
<entry>
<title>Drop Ruby 2.5 support</title>
<updated>2022-11-17T04:06:32+00:00</updated>
<author>
<name>st0012</name>
<email>stan001212@gmail.com</email>
</author>
<published>2022-07-25T22:35:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=923c1aaed7a5707d5c358627aad37f29e7738143'/>
<id>923c1aaed7a5707d5c358627aad37f29e7738143</id>
<content type='text'>
Because it has reached EOL for more than 1.5 years and it won't be
supported by the next reline version either.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Because it has reached EOL for more than 1.5 years and it won't be
supported by the next reline version either.
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/irb] Remove duplicated TestInputMethod definitions</title>
<updated>2022-11-15T10:07:32+00:00</updated>
<author>
<name>st0012</name>
<email>stan001212@gmail.com</email>
</author>
<published>2022-11-13T11:19:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=1eae15142f0fd9e5285e3d685bb1448f0f441b1c'/>
<id>1eae15142f0fd9e5285e3d685bb1448f0f441b1c</id>
<content type='text'>
https://github.com/ruby/irb/commit/4b831d02e1
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/irb/commit/4b831d02e1
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/irb] Provide a base test class and let tests restore encodings</title>
<updated>2022-11-03T22:13:11+00:00</updated>
<author>
<name>Stan Lo</name>
<email>stan.lo@shopify.com</email>
</author>
<published>2022-11-03T22:13:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=a9232038119f2401e6c3d3a4946114b1e878afb5'/>
<id>a9232038119f2401e6c3d3a4946114b1e878afb5</id>
<content type='text'>
conveniently
(https://github.com/ruby/irb/pull/429)

* Create a base TestIRB::TestCase class

* Save/restore encodings for tests that initializes InputMethod classes

Because `RelineInputMethod#initializes` calls `set_encoding`, which
changes stdio/out/err and Encoding's default encoding values, we need to
make sure any test that directly or indirectly (e.g. through Context)
initializes `RelineInputMethod` restores encodings.

`ReadlineInputMethod` also changes encodings but currently no tests
cover it.

* Remove unnecessary TestHelper module

Since we now have a base TestCase, without_rdoc can just live there.

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

* Create a base TestIRB::TestCase class

* Save/restore encodings for tests that initializes InputMethod classes

Because `RelineInputMethod#initializes` calls `set_encoding`, which
changes stdio/out/err and Encoding's default encoding values, we need to
make sure any test that directly or indirectly (e.g. through Context)
initializes `RelineInputMethod` restores encodings.

`ReadlineInputMethod` also changes encodings but currently no tests
cover it.

* Remove unnecessary TestHelper module

Since we now have a base TestCase, without_rdoc can just live there.

https://github.com/ruby/irb/commit/c2874ec121
</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] Properly reset USE_COLORIZE after changing it in tests</title>
<updated>2022-06-28T15:23:18+00:00</updated>
<author>
<name>st0012</name>
<email>stan001212@gmail.com</email>
</author>
<published>2022-06-28T15:17:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=a415a3de05e0b61fbed44d5ecba4497d8f096351'/>
<id>a415a3de05e0b61fbed44d5ecba4497d8f096351</id>
<content type='text'>
Some context tests assigns USE_COLORIZE to false and never change it
back. This can potentially affect other tests' result as the default
should be nil (activated) instead.

https://github.com/ruby/irb/commit/986eb16ece
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Some context tests assigns USE_COLORIZE to false and never change it
back. This can potentially affect other tests' result as the default
should be nil (activated) instead.

https://github.com/ruby/irb/commit/986eb16ece
</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>
<entry>
<title>[ruby/irb] Set prompt mode explictly</title>
<updated>2022-06-26T06:23:33+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2022-06-26T06:21:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=0e5f9afff6051d209d032abac23ec961d5d52d48'/>
<id>0e5f9afff6051d209d032abac23ec961d5d52d48</id>
<content type='text'>
Fix https://github.com/ruby/irb/pull/353

https://github.com/ruby/irb/commit/7db93f9326
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix https://github.com/ruby/irb/pull/353

https://github.com/ruby/irb/commit/7db93f9326
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/irb] Require stringio to use StringIO</title>
<updated>2022-06-26T06:23:32+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2022-06-26T06:09:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=a2b3f2014cf15daa4b608b82a8432b46a13c0e54'/>
<id>a2b3f2014cf15daa4b608b82a8432b46a13c0e54</id>
<content type='text'>
https://github.com/ruby/irb/commit/e024ab716b
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/irb/commit/e024ab716b
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/irb] Ensure stdout is a TTY before calling winsize</title>
<updated>2022-06-26T05:40:48+00:00</updated>
<author>
<name>Peter Jones</name>
<email>pjones@devalot.com</email>
</author>
<published>2022-03-24T20:48:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=e0bfdb23af3f182d7605a6ac3c93b07001d9045c'/>
<id>e0bfdb23af3f182d7605a6ac3c93b07001d9045c</id>
<content type='text'>
When outputting a (possibly truncated) value, IRB will query the
window size.  However, if IRB was piped to another process, stdout
will no longer be a TTY and will not support the `winsize` method.

This fix ensure that stdout is a TTY.

https://github.com/ruby/irb/commit/125de5eeea
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When outputting a (possibly truncated) value, IRB will query the
window size.  However, if IRB was piped to another process, stdout
will no longer be a TTY and will not support the `winsize` method.

This fix ensure that stdout is a TTY.

https://github.com/ruby/irb/commit/125de5eeea
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/irb] Check colorize option correctly to clear char attr and don't use it for tests</title>
<updated>2021-12-21T06:50:32+00:00</updated>
<author>
<name>aycabta</name>
<email>aycabta@gmail.com</email>
</author>
<published>2021-12-21T06:50:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=1855f901c801a4c21e0d2834da8ef914bf47f3d9'/>
<id>1855f901c801a4c21e0d2834da8ef914bf47f3d9</id>
<content type='text'>
https://github.com/ruby/irb/commit/de561cafeb
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/irb/commit/de561cafeb
</pre>
</div>
</content>
</entry>
</feed>
