<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/lib/irb/completion.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] Fix https://github.com/ruby/irb/pull/295: Ignore Java</title>
<updated>2022-11-17T03:39:04+00:00</updated>
<author>
<name>Patrick Plenefisch</name>
<email>simonpatp@gmail.com</email>
</author>
<published>2022-09-30T18:26:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=e61b3e6f43434bd815577a67d4f1719091b57d5c'/>
<id>e61b3e6f43434bd815577a67d4f1719091b57d5c</id>
<content type='text'>
package reference objects in
JRuby

https://github.com/ruby/irb/commit/84d030182d
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
package reference objects in
JRuby

https://github.com/ruby/irb/commit/84d030182d
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/irb] Don't lazily retrieve gem specs for completion</title>
<updated>2022-11-07T14:44:25+00:00</updated>
<author>
<name>Stan Lo</name>
<email>stan.lo@shopify.com</email>
</author>
<published>2022-11-06T14:55:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=ca0b59267352dd23bc53b5cb6f09aacd0025f536'/>
<id>ca0b59267352dd23bc53b5cb6f09aacd0025f536</id>
<content type='text'>
There are a few downsides of the current approach:

1. Because gem specs are lazily retrieved, this computation happens in
   every irb completion test case, which is not necessary. (In tests we
   don't cache the result of `retrieve_files_to_require_from_load_path`)
2. Gem::Specification.latest_specs is sensible to the content of
   LOAD_PATH. And when combined with 1, tests fail "randomly" if they
   try to mutate LOAD_PATH, even though the test subject it's something
   else.

So by pre-computing and storing the gem paths in a constant, it guarantees
that the computation only happens once and it doesn't get affected by test
cases.

One argument could be made against the change is that, it'll store
unnecessary data for users that disable autocompletion. But the
counter-arguments are:

1. Since autocompletion is enabled by default, this should not be the
   case for most users.
2. For users with autocompletion enabled, IRB already caches the
   result of `retrieve_files_to_require_from_load_path` in memory, which
   should have a similar size of GEM_SPECS. And we currently haven't
   received any report about problems caused by such memory consumption.

https://github.com/ruby/irb/commit/c671d39020
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There are a few downsides of the current approach:

1. Because gem specs are lazily retrieved, this computation happens in
   every irb completion test case, which is not necessary. (In tests we
   don't cache the result of `retrieve_files_to_require_from_load_path`)
2. Gem::Specification.latest_specs is sensible to the content of
   LOAD_PATH. And when combined with 1, tests fail "randomly" if they
   try to mutate LOAD_PATH, even though the test subject it's something
   else.

So by pre-computing and storing the gem paths in a constant, it guarantees
that the computation only happens once and it doesn't get affected by test
cases.

One argument could be made against the change is that, it'll store
unnecessary data for users that disable autocompletion. But the
counter-arguments are:

1. Since autocompletion is enabled by default, this should not be the
   case for most users.
2. For users with autocompletion enabled, IRB already caches the
   result of `retrieve_files_to_require_from_load_path` in memory, which
   should have a similar size of GEM_SPECS. And we currently haven't
   received any report about problems caused by such memory consumption.

https://github.com/ruby/irb/commit/c671d39020
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/irb] Sort constant completion's candidates</title>
<updated>2022-10-07T18:17:42+00:00</updated>
<author>
<name>st0012</name>
<email>stan001212@gmail.com</email>
</author>
<published>2022-10-06T11:37:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=5b3079a8a5f66859c8d80ad55b5424c7c1877443'/>
<id>5b3079a8a5f66859c8d80ad55b5424c7c1877443</id>
<content type='text'>
https://github.com/ruby/irb/commit/ee9b33c817
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/irb/commit/ee9b33c817
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/irb] Lazily evaluate candidates locals</title>
<updated>2022-10-07T18:17:42+00:00</updated>
<author>
<name>st0012</name>
<email>stan001212@gmail.com</email>
</author>
<published>2022-10-06T10:54:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=7cafe09aec76924eafe3ca46b0265de44930a67e'/>
<id>7cafe09aec76924eafe3ca46b0265de44930a67e</id>
<content type='text'>
https://github.com/ruby/irb/commit/19a2fcbd87
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/irb/commit/19a2fcbd87
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/irb] Fixed sort of variables in completion</title>
<updated>2022-10-05T10:22:13+00:00</updated>
<author>
<name>Imir Kiyamov</name>
<email>makketagg@gmail.com</email>
</author>
<published>2022-07-18T16:45:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=83a6213f31016e16bf43613beb4d058339ca9350'/>
<id>83a6213f31016e16bf43613beb4d058339ca9350</id>
<content type='text'>
https://github.com/ruby/irb/commit/5842888255
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/irb/commit/5842888255
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/irb] Change to explicit method call in completion (https://github.com/ruby/irb/pull/369)</title>
<updated>2022-10-02T21:55:53+00:00</updated>
<author>
<name>osyo-manga</name>
<email>manga.osyo@gmail.com</email>
</author>
<published>2022-10-02T21:55:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=7b88ffb34fc995d7499fd9ed384cf7f5ba12994e'/>
<id>7b88ffb34fc995d7499fd9ed384cf7f5ba12994e</id>
<content type='text'>
Ensure that methods are called even when local variables are defined.
see: https://github.com/ruby/irb/issues/368

https://github.com/ruby/irb/commit/c34d54b8bb
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Ensure that methods are called even when local variables are defined.
see: https://github.com/ruby/irb/issues/368

https://github.com/ruby/irb/commit/c34d54b8bb
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/irb] Handle non-String $LOAD_PATH values more carefully</title>
<updated>2022-09-21T13:24:27+00:00</updated>
<author>
<name>st0012</name>
<email>stan001212@gmail.com</email>
</author>
<published>2022-09-19T15:14:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=6325fc885474937e1250d6605fd594cf70f0794c'/>
<id>6325fc885474937e1250d6605fd594cf70f0794c</id>
<content type='text'>
In addition to String values, $LOAD_PATH can also take objects that
respond_to the `to_path` method, like Pathname objects. So `irb` should
be able to handle those objects too.

And if $LOAD_PATH contains objects that can't be converted into String,
`irb` should simply ignore it.

https://github.com/ruby/irb/commit/b2f562176b
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In addition to String values, $LOAD_PATH can also take objects that
respond_to the `to_path` method, like Pathname objects. So `irb` should
be able to handle those objects too.

And if $LOAD_PATH contains objects that can't be converted into String,
`irb` should simply ignore it.

https://github.com/ruby/irb/commit/b2f562176b
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/irb] Ignore parenthesis during completion</title>
<updated>2021-10-12T21:33:48+00:00</updated>
<author>
<name>Kaíque Kandy Koga</name>
<email>kaiquekandykoga@gmail.com</email>
</author>
<published>2021-10-10T19:30:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=5c646ca0a09c5249b20cf5645e27ee75fe4dff04'/>
<id>5c646ca0a09c5249b20cf5645e27ee75fe4dff04</id>
<content type='text'>
Rename method

https://github.com/ruby/irb/commit/619aecb412
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Rename method

https://github.com/ruby/irb/commit/619aecb412
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/irb] Revert "Show original string byte sequence to debug"</title>
<updated>2021-09-24T14:50:32+00:00</updated>
<author>
<name>aycabta</name>
<email>aycabta@gmail.com</email>
</author>
<published>2021-09-23T09:02:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=ff26c60bc137b6be96c7f49241b831b037a157b3'/>
<id>ff26c60bc137b6be96c7f49241b831b037a157b3</id>
<content type='text'>
This reverts commit b42fe5937ab2a605a198ffb866db5ccda541568d.

https://github.com/ruby/irb/commit/b22094a16f
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit b42fe5937ab2a605a198ffb866db5ccda541568d.

https://github.com/ruby/irb/commit/b22094a16f
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/irb] Show original string byte sequence to debug</title>
<updated>2021-09-24T14:50:26+00:00</updated>
<author>
<name>aycabta</name>
<email>aycabta@gmail.com</email>
</author>
<published>2021-09-23T07:20:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=93291005a0bcb11d8dca4abdc645d50e1c98aefd'/>
<id>93291005a0bcb11d8dca4abdc645d50e1c98aefd</id>
<content type='text'>
https://github.com/ruby/irb/commit/7a97bb0e56
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/irb/commit/7a97bb0e56
</pre>
</div>
</content>
</entry>
</feed>
