korimo / firewatir

Automatically exported from code.google.com/p/firewatir
0 stars 0 forks source link

Syntax error in jssh_socket.rb #92

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. using firefox.goto("javascript:...")

What is the expected output? What do you see instead?
Seeing  "jssh_socket.rb:12:in `js_eval':  missing ) after argument list
(JsshSocket::JSSyntaxError)"

What version of the product are you using? On what operating system?
firewatir 1.6.5 on OS X 10.6.3 and the latest JSSH download.

Please provide any additional information below.
The closing parenthesis ")" is on the wrong place in module JsshSocket,
file jssh_socket.rb, line 12. The line reads:

    raise JsshSocket.const_get(errclassname), md[2]

it should read

    raise JsshSocket.const_get(errclassname, md[2])

Original issue reported on code.google.com by jqp...@yahoo.com on 1 Apr 2010 at 10:16

GoogleCodeExporter commented 9 years ago
I think the code is correct as-is. It's passing two parameters to "raise": the 
error class name, and "md[2]", which represents the error message itself. 

It should probably actually have extra parens for clarity:
  raise(JsshSocket.const_get(errclassname), md[2])

Original comment by stry...@gmail.com on 8 Aug 2011 at 7:04