Likely bug in Mechanize 0.7.6

  • Thread starter Just Another Victim of the Ambient Morality
  • Start date
J

Just Another Victim of the Ambient Morality

I was trying to use Mechanize when it kept throwing an exception at me.
After trying to debug it, I found this code snippet starting at line 441 of
mechanize.rb:


url = ((base && base.uri && base.uri.absolute?) ?
base.uri :
cur_page.uri) + url
url = cur_page.uri + url


Now, without knowing anything about what this method does or how
mechanize even works, I'm pretty sure that this is a bug. The method
literally crashes when trying to call method "uri" of the variable "base."
Commenting out the first assignment seems to allow the code to work
(although I don't understand how). Hopefully, mechanize doesn't depend on
any side effects of the various methods called in the first assignment.
Does anyone know of a proper fix to this bug?
Thank you...
 
E

Eric Hodel

I was trying to use Mechanize when it kept throwing an exception
at me.
After trying to debug it, I found this code snippet starting at line
441 of
mechanize.rb:


url = ((base && base.uri && base.uri.absolute?) ?
base.uri :
cur_page.uri) + url
url = cur_page.uri + url


Now, without knowing anything about what this method does or how
mechanize even works, I'm pretty sure that this is a bug. The method
literally crashes when trying to call method "uri" of the variable
"base."
Commenting out the first assignment seems to allow the code to work
(although I don't understand how). Hopefully, mechanize doesn't
depend on
any side effects of the various methods called in the first
assignment.
Does anyone know of a proper fix to this bug?

Did you file a ticket on the Mechanize bug tracker with the way to
reproduce it including backtrace and so-forth?
 
J

Just Another Victim of the Ambient Morality

Eric Hodel said:
Did you file a ticket on the Mechanize bug tracker with the way to
reproduce it including backtrace and so-forth?

Considering how I have no idea what I'm doing... no, I haven't. Do I do
this at RubyForge? ...under "Submit New?"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,292
Messages
2,571,494
Members
48,170
Latest member
รับปั๊มไลค์|FastLike

Latest Threads

Top