watir-console broken on Ruby 1.8.7
----------------------------------
Key: WTR-467
URL: http://jira.openqa.org/browse/WTR-467
Project: Watir
Issue Type: Bug
Components: Other
Affects Versions: 1.6.7
Environment: win 7 running ruby 1.8.7
Reporter: Alan Baird
When running watir-console with Ruby 1.8.7, I get the following error message:
{code}
C:\Users\Alan>watir-console
C:/ruby/Ruby-187-p302/lib/ruby/gems/1.8/gems/watir-1.6.7/lib/watir/irb-history.rb:3:TypeError:
History is not a module
{code}
For some reason, it seems that in 1.8.7, the Readline module has a class
History inserted in it which is throwing the error message you see (in ruby you
can't define a Module with the same name as an existing class). I tried to see
if I could fix this. One fix seemed to be to change line 3 in irb-history.rb
to use a Class instead of a Module. This doesn't give me the error message,
but the functionality suggests that it should write my commands to
'console.log' - which it doesn't.
Oddly enough, I couldn't get output to console.log to work at all in 1.8.6.
I've mainly tested this with Watir 1.6.7 and ruby 1.8.7 (2010-08-16 patchlevel
302) [i386-mingw32]. I have no reason to believe that this would be any
different for previous versions of Watir since the conflict is in irb-history.
WORKAROUND: A very simple/hacky fix is to remove "-r watir/irb-history" from
the last line (line 7) of watir-console, however, this will disable sending irb
commands to 'console.log'.
BTW - I've found Pik to be really useful in testing this behavior on Windows.
Alan
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.openqa.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
_______________________________________________
Wtr-development mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-development