I have the following Ruby script:
begin
puts "What is the password? "
the_pass = ask("") { |q| q.echo = "*" }
end while the_pass == nil || the_pass == "\n" || the_pass == ""
And it fails when I hit Enter:
undefined method
default_external' for REXML::Encoding:Module /Library/Ruby/Gems/1.8/gems/highline-1.6.19/lib/highline.rb:621:in
say' /Library/Ruby/Gems/1.8/gems/highline-1.6.19/lib/highline.rb:914:inget_response' /Library/Ruby/Gems/1.8/gems/highline-1.6.19/lib/highline.rb:259:in
ask'
Looks like it fails when validating the input for the_pass
, but I cannot understand the error, how are they related?
Thanks