From: Tom Cloyd [mailto:tomcloyd / comcast.net]=20
# I'm playing with various ways of using readline, like
#
# require 'readline'
# puts 'test under way'
# opt =3D readline( "=3D--> \n")
# puts( opt)
#=20
# Nothing works, so far. The code above seems to stop at line=20
# 2. Or maybe it's 3, but there's no prompt output.=20
# We surely never get to line 4.

that is because, the line

opt =3D readline( "=3D--> \n") will call ruby's Kernel.readline and not =
readline's readline (if i may say that ;-). So, what is happening is =
that ruby will treat "=3D--> \n" not as a prompt, but as your input =
ender, ergo it is waiting for the string "=3D--> \n" wc you never type =
obviously.

you really want

opt =3D Readline::readline( "=3D--> \n")=20


Eg,

botp@pc4all:~$ cat test.rb
require 'readline'
puts 'test under way'
opt =3D Readline::readline( "=3D-->\n")
puts( opt)

botp@pc4all:~$ ruby test.rb
test under way
=3D-->
is this ok?
is this ok?
botp@pc4all:~$


kind regards -botp