<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/test/irb/test_init.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>[ruby/irb] Allow disabling autocompletion with</title>
<updated>2022-12-06T00:53:32+00:00</updated>
<author>
<name>Stan Lo</name>
<email>stan.lo@shopify.com</email>
</author>
<published>2022-12-06T00:53:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=9aa18f61f297fcb2ee0cbd4be0772607745274b7'/>
<id>9aa18f61f297fcb2ee0cbd4be0772607745274b7</id>
<content type='text'>
`IRB_USE_AUTOCOMPLETE=false`
(https://github.com/ruby/irb/pull/469)

* Allow using IRB_USE_AUTOCOMPLETE=false to disable autocompletion

Currently, the only 2 ways to disable autocompletion are:

1. Create `.irbrc` and set `IRB.conf[:USE_AUTOCOMPLETE] = false`
2. Add the `--noautocomplete` flag when using the `irb` executable

Both of them are less convenient than setting a env var and are
lesser known to devs.

And given the number of problems the autocompletion has (see #445), I
think we should allow disabling it with a simple `IRB_USE_AUTOCOMPLETE=false`.

* Mention some env var configs in the README</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
`IRB_USE_AUTOCOMPLETE=false`
(https://github.com/ruby/irb/pull/469)

* Allow using IRB_USE_AUTOCOMPLETE=false to disable autocompletion

Currently, the only 2 ways to disable autocompletion are:

1. Create `.irbrc` and set `IRB.conf[:USE_AUTOCOMPLETE] = false`
2. Add the `--noautocomplete` flag when using the `irb` executable

Both of them are less convenient than setting a env var and are
lesser known to devs.

And given the number of problems the autocompletion has (see #445), I
think we should allow disabling it with a simple `IRB_USE_AUTOCOMPLETE=false`.

* Mention some env var configs in the README</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] Do not make non-existent XDG directory on start</title>
<updated>2022-10-28T09:36:28+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2022-03-31T03:51:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=4021c6565f9655bfd667152f76f22f7cc81c7e17'/>
<id>4021c6565f9655bfd667152f76f22f7cc81c7e17</id>
<content type='text'>
(https://github.com/ruby/irb/pull/357)


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


https://github.com/ruby/irb/commit/298b134792
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/irb] Update regarding NO_COLOR value</title>
<updated>2022-10-28T09:30:24+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2022-10-28T09:30:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=56c97a6621241db99f7c96740164bdd8f898d881'/>
<id>56c97a6621241db99f7c96740164bdd8f898d881</id>
<content type='text'>
https://no-color.org has been updated (jcs/no_color#83):

&gt; Command-line software which adds ANSI color to its output by default
should check for a `NO_COLOR` environment variable that, when present
and **not an empty string** (regardless of its value), prevents the
addition of ANSI color.

https://github.com/ruby/irb/commit/46e0f7e370

Co-authored-by: Stan Lo &lt;stan001212@gmail.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://no-color.org has been updated (jcs/no_color#83):

&gt; Command-line software which adds ANSI color to its output by default
should check for a `NO_COLOR` environment variable that, when present
and **not an empty string** (regardless of its value), prevents the
addition of ANSI color.

https://github.com/ruby/irb/commit/46e0f7e370

Co-authored-by: Stan Lo &lt;stan001212@gmail.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/irb] Support --noscript option to not use first non-option argument as script</title>
<updated>2022-09-16T17:25:26+00:00</updated>
<author>
<name>Jeremy Evans</name>
<email>code@jeremyevans.net</email>
</author>
<published>2022-09-16T17:25:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=b07db967441161a84386bcbbb41d990a2f3ad31c'/>
<id>b07db967441161a84386bcbbb41d990a2f3ad31c</id>
<content type='text'>
Also add --script option to turn the option back on.

Previously there wasn't a way to get an interactive IRB session
and access arguments provided on the command line.

Additionally, handle `-` as script as stdin. In Unix-like tools, `-`
means to take standard input instead of a file.  This doesn't
result in exactly the same output for:

```
echo 'p ARGV' &gt; args.rb; irb args.rb a b c
```

and

```
echo 'p ARGV' | irb - a b c
```

Due to how irb handles whether stdin is a tty.

However, this change allows use of `-` as a argument, instead of
giving an unrecognized switch error. This required some small
changes to context.rb (to handle `-` as standard input) and
input-method.rb (to have FileInputMethod accept IO arguments in
addition to strings).

Implements [Feature #15371]

https://github.com/ruby/irb/commit/4192683ba2
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Also add --script option to turn the option back on.

Previously there wasn't a way to get an interactive IRB session
and access arguments provided on the command line.

Additionally, handle `-` as script as stdin. In Unix-like tools, `-`
means to take standard input instead of a file.  This doesn't
result in exactly the same output for:

```
echo 'p ARGV' &gt; args.rb; irb args.rb a b c
```

and

```
echo 'p ARGV' | irb - a b c
```

Due to how irb handles whether stdin is a tty.

However, this change allows use of `-` as a argument, instead of
giving an unrecognized switch error. This required some small
changes to context.rb (to handle `-` as standard input) and
input-method.rb (to have FileInputMethod accept IO arguments in
addition to strings).

Implements [Feature #15371]

https://github.com/ruby/irb/commit/4192683ba2
</pre>
</div>
</content>
</entry>
<entry>
<title>Skip TestIRB::TestInit#test_recovery_sigint on Solaris</title>
<updated>2021-11-05T11:03:11+00:00</updated>
<author>
<name>Yusuke Endoh</name>
<email>mame@ruby-lang.org</email>
</author>
<published>2021-11-05T11:03:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=56119c5245ac4fa8d7c22de584a226b44082f61e'/>
<id>56119c5245ac4fa8d7c22de584a226b44082f61e</id>
<content type='text'>
The test randomly gets stuck on Solaris:

http://rubyci.s3.amazonaws.com/solaris11-sunc/ruby-master/log/20211105T060014Z.fail.html.gz
```
  1) Error:
TestIRB::TestInit#test_recovery_sigint:
Timeout::Error: execution of assert_in_out_err expired timeout (100.0 sec)
pid 3195 killed by SIGTERM (signal 15)
| Switch to inspect mode.
| exit
|
```

I investigated the issue but I couldn't figure it out.
This random failure is noisy, which makes it difficult to track the CI.
So I skip the test on Soalris. Contribution is welcome.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The test randomly gets stuck on Solaris:

http://rubyci.s3.amazonaws.com/solaris11-sunc/ruby-master/log/20211105T060014Z.fail.html.gz
```
  1) Error:
TestIRB::TestInit#test_recovery_sigint:
Timeout::Error: execution of assert_in_out_err expired timeout (100.0 sec)
pid 3195 killed by SIGTERM (signal 15)
| Switch to inspect mode.
| exit
|
```

I investigated the issue but I couldn't figure it out.
This random failure is noisy, which makes it difficult to track the CI.
So I skip the test on Soalris. Contribution is welcome.
</pre>
</div>
</content>
</entry>
<entry>
<title>Set USE_COLORIZE to the default value in a test</title>
<updated>2021-05-24T03:13:46+00:00</updated>
<author>
<name>aycabta</name>
<email>aycabta@gmail.com</email>
</author>
<published>2021-05-24T03:13:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=f57968e329ce039395a6b7dc1886eb097c99b867'/>
<id>f57968e329ce039395a6b7dc1886eb097c99b867</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/irb] update test/irb/test_init.rb to avoid useless eval</title>
<updated>2021-05-24T02:56:05+00:00</updated>
<author>
<name>jethrodaniel</name>
<email>jethrodaniel@gmail.com</email>
</author>
<published>2020-08-12T02:32:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=d06d4560a1196c72831fe59faa698d6672883448'/>
<id>d06d4560a1196c72831fe59faa698d6672883448</id>
<content type='text'>
Co-authored-by: Nobuyoshi Nakada &lt;nobu@ruby-lang.org&gt;

https://github.com/ruby/irb/commit/2dfdc031ec
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Co-authored-by: Nobuyoshi Nakada &lt;nobu@ruby-lang.org&gt;

https://github.com/ruby/irb/commit/2dfdc031ec
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/irb] respect NO_COLOR environment variable</title>
<updated>2021-05-24T02:55:58+00:00</updated>
<author>
<name>Mark Delk</name>
<email>jethrodaniel@gmail.com</email>
</author>
<published>2020-05-18T01:12:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=b8ffb1c46f03dacfdb6b4417274ca66cc9142e5b'/>
<id>b8ffb1c46f03dacfdb6b4417274ca66cc9142e5b</id>
<content type='text'>
When `NO_COLOR` is set to any non-nil value, output is not colorized.

See https://no-color.org/

https://github.com/ruby/irb/commit/401d0916fe
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When `NO_COLOR` is set to any non-nil value, output is not colorized.

See https://no-color.org/

https://github.com/ruby/irb/commit/401d0916fe
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/irb] Added setup and teardown to TestIRB::TestInit</title>
<updated>2021-04-26T12:15:06+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2021-04-15T13:24:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=5219b4ddb4b89dfe8a951da75f5ab78431781d7f'/>
<id>5219b4ddb4b89dfe8a951da75f5ab78431781d7f</id>
<content type='text'>
Not to be affected by existing rc files in all tests.

https://github.com/ruby/irb/commit/bf434892b4
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Not to be affected by existing rc files in all tests.

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