<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/lib/irb/input-method.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] Rename leftover Reidline references</title>
<updated>2022-11-15T10:08:28+00:00</updated>
<author>
<name>st0012</name>
<email>stan001212@gmail.com</email>
</author>
<published>2022-10-05T11:38:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=4f348e482c2b539aaf535ac3dabc07fed6718e59'/>
<id>4f348e482c2b539aaf535ac3dabc07fed6718e59</id>
<content type='text'>
https://github.com/ruby/irb/commit/0ed8b103ed
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/irb/commit/0ed8b103ed
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/irb] Move require out of repeated execution path</title>
<updated>2022-10-24T13:36:57+00:00</updated>
<author>
<name>st0012</name>
<email>stan001212@gmail.com</email>
</author>
<published>2022-10-18T09:08:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=b7622d792dde7922692de6fcf43bd87cd7faa97b'/>
<id>b7622d792dde7922692de6fcf43bd87cd7faa97b</id>
<content type='text'>
SHOW_DOC_DIALOG will be called repeatedly whenever the corresponding key
is pressed, but we only need to require rdoc once. So ideally the
require can be put outside of the proc.

And because when rdoc is not available the entire proc will be
nonfunctional, we can stop registering the SHOW_DOC_DIALOG if we failed
to require rdoc.

https://github.com/ruby/irb/commit/b1278b7320
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
SHOW_DOC_DIALOG will be called repeatedly whenever the corresponding key
is pressed, but we only need to require rdoc once. So ideally the
require can be put outside of the proc.

And because when rdoc is not available the entire proc will be
nonfunctional, we can stop registering the SHOW_DOC_DIALOG if we failed
to require rdoc.

https://github.com/ruby/irb/commit/b1278b7320
</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] Rename IDB::ReidlineInputMethod to IRB::RelineInputMethod</title>
<updated>2022-10-05T08:14:19+00:00</updated>
<author>
<name>Gannon McGibbon</name>
<email>gannon.mcgibbon@gmail.com</email>
</author>
<published>2022-10-04T20:28:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=19e4a4c624c0872796e3fcde4923b670011e0b59'/>
<id>19e4a4c624c0872796e3fcde4923b670011e0b59</id>
<content type='text'>
Deprecates IDB::ReidlineInputMethod and USE_REIDLINE in favor of
IRB::RelineInputMethod and USE_RELINE. The Input method uses Reline to
read input from the console, so it can be named directly after the
Reline library like other inputs methods are (Readline, Stdio, etc.).

https://github.com/ruby/irb/commit/5bcade7130
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Deprecates IDB::ReidlineInputMethod and USE_REIDLINE in favor of
IRB::RelineInputMethod and USE_RELINE. The Input method uses Reline to
read input from the console, so it can be named directly after the
Reline library like other inputs methods are (Readline, Stdio, etc.).

https://github.com/ruby/irb/commit/5bcade7130
</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>[ruby/irb] Require RDoc in `input-method.rb` again in a limited scope.</title>
<updated>2022-08-26T00:57:02+00:00</updated>
<author>
<name>Jun Aruga</name>
<email>jaruga@redhat.com</email>
</author>
<published>2022-08-25T18:11:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=3504be1bc13235407e01f55d3df6fe0b4cb5ba9e'/>
<id>3504be1bc13235407e01f55d3df6fe0b4cb5ba9e</id>
<content type='text'>
RDoc is implemented as soft dependency in IRB. See how the rdoc is required in
the files. I reverted the commit below.

```
$ grep -ril rdoc lib/
lib/irb/cmd/help.rb
lib/irb/completion.rb
lib/irb/easter-egg.rb
lib/irb/input-method.rb
```

---

Revert "Remove `require` in signal handler to avoid ThreadError"

This reverts commit https://github.com/ruby/irb/commit/5f749c613c89.

https://github.com/ruby/irb/commit/b24852058f
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
RDoc is implemented as soft dependency in IRB. See how the rdoc is required in
the files. I reverted the commit below.

```
$ grep -ril rdoc lib/
lib/irb/cmd/help.rb
lib/irb/completion.rb
lib/irb/easter-egg.rb
lib/irb/input-method.rb
```

---

Revert "Remove `require` in signal handler to avoid ThreadError"

This reverts commit https://github.com/ruby/irb/commit/5f749c613c89.

https://github.com/ruby/irb/commit/b24852058f
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/irb] Drop hard dependency on RDoc.</title>
<updated>2022-08-23T09:01:35+00:00</updated>
<author>
<name>Vít Ondruch</name>
<email>vondruch@redhat.com</email>
</author>
<published>2022-08-23T08:41:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=46c3a93982d0b81668668a65c10bc3670a488d8a'/>
<id>46c3a93982d0b81668668a65c10bc3670a488d8a</id>
<content type='text'>
This has been introduced in https://github.com/ruby/irb/commit/026700499dfd,
but it seems that this is just be mistake, otherwise the later handling
of `LoadError` would not be needed.

https://github.com/ruby/irb/commit/54c8df06ff
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This has been introduced in https://github.com/ruby/irb/commit/026700499dfd,
but it seems that this is just be mistake, otherwise the later handling
of `LoadError` would not be needed.

https://github.com/ruby/irb/commit/54c8df06ff
</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] Prefer `IO#wait_readable` over `IO#select`. (https://github.com/ruby/irb/pull/323)</title>
<updated>2021-12-29T00:37:05+00:00</updated>
<author>
<name>Samuel Williams</name>
<email>samuel.williams@oriontransfer.co.nz</email>
</author>
<published>2021-12-29T00:37:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=e4cd319f3d6560b76dbc1c7e89aa4d790a2d1e43'/>
<id>e4cd319f3d6560b76dbc1c7e89aa4d790a2d1e43</id>
<content type='text'>
https://github.com/ruby/irb/commit/1c03bd3373
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/irb/commit/1c03bd3373
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/irb] Support showing doc by dialog in iTerm2</title>
<updated>2021-12-25T03:56:40+00:00</updated>
<author>
<name>aycabta</name>
<email>aycabta@gmail.com</email>
</author>
<published>2021-12-25T03:56:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=ddf0cdee4f449c2b71910357183d1ff9ed19e1ea'/>
<id>ddf0cdee4f449c2b71910357183d1ff9ed19e1ea</id>
<content type='text'>
https://github.com/ruby/irb/commit/a4b95d6634
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/irb/commit/a4b95d6634
</pre>
</div>
</content>
</entry>
</feed>
