[MacRuby] #1182: The Mechanize Gem Fails Under MacRuby But Runs Under Ruby 1.9.2
MacRuby
ruby-noreply at macosforge.org
Sun Mar 13 01:41:53 PST 2011
#1182: The Mechanize Gem Fails Under MacRuby But Runs Under Ruby 1.9.2
------------------------------------+---------------------------------------
Reporter: dekiefer@… | Owner: lsansonetti@…
Type: defect | Status: new
Priority: minor | Milestone: MacRuby 0.10
Component: MacRuby | Keywords: Mechanize gem
------------------------------------+---------------------------------------
Comment(by cyberfox@…):
Oh...my, that didn't work. :(
{{{
a = Mechanize.new { |agent| agent.user_agent = "Mozilla/5.0 (Macintosh; U;
Intel Mac OS X 10.6; en-US; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13"}
b = a.get('http://example.com')
b.mech = a
c = b.link_with(:text => /text of a link/).href
d = a.get(c)
d.mech = a
puts d.search('td.inf_lab')[1].parent.children[0].content
puts d.search('td.inf_lab')[1].parent.children[1].content
}}}
--
Ticket URL: <http://www.macruby.org/trac/ticket/1182#comment:2>
MacRuby <http://macruby.org/>
More information about the macruby-tickets
mailing list