Skip to content
Browse files

Update spider example to use unlimited history

  • Loading branch information...
1 parent bd2a7d9 commit 758f174b3a17cbbf8b81cdcdc299b53ff5f2d371 @drbrain drbrain committed Feb 21, 2012
Showing with 2 additions and 1 deletion.
  1. +1 −0 examples/spider.rb
  2. +1 −1 lib/mechanize.rb
View
1 examples/spider.rb
@@ -2,6 +2,7 @@
require 'mechanize'
agent = Mechanize.new
+agent.max_history = nil # unlimited history
stack = agent.get(ARGV[0]).links
while l = stack.pop
View
2 lib/mechanize.rb
@@ -209,7 +209,7 @@ def history
##
# Maximum number of items allowed in the history. The default setting is 50
# pages. Note that the size of the history multiplied by the maximum
- # response body size
+ # response body size
def max_history
@agent.history.max_size

0 comments on commit 758f174

Please sign in to comment.
Something went wrong with that request. Please try again.