Issue #17680 has been updated by xtkoba (Tee KOBAYASHI).


What is confusing is that the behavior of IRB changes drastically with `readline.so`. I suppose that Ruby 2.5 of the main issue is the case when `readline.so` is installed, and that the rest (Ruby 3.0 of the main issue and Ruby 2.5 of #note-1) are when it is not installed.

My observation is as follows. For Ruby 2.5.8:
```
/$ ruby --version
ruby 2.5.8p224 (2020-03-31 revision 67882) [x86_64-linux]

/$ irb --version
irb 0.9.6(09/06/30)

/$ [Make sure that readline.so exists]

/$ irb
irb(main):001:0> "[Press Tab twice]
bin/   dev/   home/  lib64/ mnt/   proc/  run/   sys/   usr/
boot/  etc/   lib/   media/ opt/   root/  sbin/  tmp/   var/

[Terminate IRB]

/$ [Remove readline.so]

/$ irb
irb(main):001:0> "[Press Tab here, and ...]
irb(main):001:0> "      [<- "\t" is shown]
```

For Ruby 2.7.2:
```
/$ ruby --version
ruby 2.7.2p137 (2020-10-01 revision 5445e04352) [x86_64-linux]

/$ irb --version
irb 1.2.6 (2020-09-14)

/$ [Make sure that readline.so exists]

/$ irb
irb(main):001:0> "[Nothing happens when Tab is pressed many times]

[Terminate IRB]

/$ [Remove readline.so]

/$ irb
irb(main):001:0> "[Press Tab here, and ...]
irb(main):001:0> ""
```

As you can see above, there are four patterns of Tab behavior depending on the version of IRB/Ruby and the existence of `readline.so`.

----------------------------------------
Bug #17680: tab completion no longer works on irb3.0
https://bugs.ruby-lang.org/issues/17680#change-90896

* Author: simondedeo (Simon DeDeo)
* Status: Open
* Priority: Normal
* ruby -v: ruby 3.0.0p0 (2020-12-25 revision 95aff21468) [x86_64-darwin16]
* Backport: 2.5: UNKNOWN, 2.6: UNKNOWN, 2.7: UNKNOWN, 3.0: UNKNOWN
----------------------------------------
in irb2.5:

rb(main):001:0> source 'li [then I hit tab...]
linking.rb        list_load.rb      list_load_OLD.rb  
irb(main):001:0> source 'lis [then I hit tab again...]
list_load.rb      list_load_OLD.rb  
irb(main):001:0> source 'list_load.rb' [then I hit tab again...]

in irb3.0, hitting tab after typing "source 'li" gives.

irb(main):001:0' source 'li'

Here are my version numbers:

ayerie:simon$ irb3.0 -v
irb 1.3.0 (2020-12-25)
ayerie:CHLOE simon$ ruby3.0 -v
ruby 3.0.0p0 (2020-12-25 revision 95aff21468) [x86_64-darwin16]
ayerie:simon$ 





-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>