Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#15 sqlsh.rb require Readline broken since ruby 1.8.0

open
nobody
None
5
2003-12-27
2003-12-27
Dierk Koenig
No

The interactive shell sqlsh.rb requires the the Readline
class from irb.
The class is not available any more in the latests
distributions of irb, cf. the ruby 1.8.0 versions.
(1.8.0-10 installer package for Windows)

The code tries to avoid some dependencies in one place:

begin
require "readline"
$use_readline = true
rescue LoadError
$use_readline = false
end

but fails to avoid the indirect dependency through irb

require "irb"
require "irb/completion"

$irb_completion = Readline.completion_proc

A first workaround is

if $use_readline
require "irb/completion" # even irb is not clean in itself
$irb_completion = Readline.completion_proc
end

But things get a little bit messy then ...

Congratulation to your excellent work!
Mittie

Discussion