# How to get an absolute link from WWW::Mechanize

**URL:** <https://www.ruby-forum.com/t/how-to-get-an-absolute-link-from-www-mechanize/153737>\
**Category:** Ruby\
**Created:** [November 20, 2008, 5:51pm UTC](https://www.ruby-forum.com/t/how-to-get-an-absolute-link-from-www-mechanize/153737 "2008-11-20T17:51:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![cage](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/bc8723/32.png) [@cage](https://www.ruby-forum.com/u/cage)\
**Post date:** [November 20, 2008, 5:51pm UTC](https://www.ruby-forum.com/t/how-to-get-an-absolute-link-from-www-mechanize/153737/1 "2008-11-20T17:51:51Z")

</div>

Hello !

I noticed links in mechanize have an absolute? method , which tells me  
if a link is absolute or not , but not an option to\_absolute . I would  
like to avoid the following :

mech.get(some\_link)  
puts mech.page.uri

in order to get to the absolute address .

Is there a smarter way of achieving this ?
