#15 sqlsh.rb require Readline broken since ruby 1.8.0

open
nobody
None
5
2003-12-27
2003-12-27
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


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks