Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Use context instead of hacky stack, which allows us to see if we're a

direct :iter descendent or not.

[git-p4: depot-paths = "//src/heckle/dev/": change = 3551]
  • Loading branch information...
commit c65377e6aafc7c5b623cac0fc58cda59f0b42d4d 1 parent e85b4b8
@drbrain drbrain authored
Showing with 9 additions and 5 deletions.
  1. +1 −0  Rakefile
  2. +8 −5 lib/heckle.rb
View
1  Rakefile
@@ -14,6 +14,7 @@ Hoe.new('heckle', Heckle::VERSION) do |p|
p.url = p.paragraphs_of('README.txt', 0).first.split(/\n/)[1..-1]
p.changes = p.paragraphs_of('History.txt', 0..1).join("\n\n")
+ p.extra_deps << ['ParseTree', '~> 2']
p.extra_deps << ['ruby2ruby', '>= 1.1.6']
p.extra_deps << ['ZenTest', '>= 3.5.2']
end
View
13 lib/heckle.rb
@@ -233,9 +233,7 @@ def process_call(exp)
call = s(:call, recv, meth, args)
- stack = caller.map { |s| s[/process_\w+/] }.compact
-
- if stack.first != "process_iter" then
+ if context[1] != :iter then
mutate_node call
else
call
@@ -592,13 +590,18 @@ def mutations_left
if sum == @last_mutations_left then
puts 'bug!'
+ puts
require 'pp'
- puts 'mutatees left:'
+ puts 'mutatees:'
pp @mutatees
puts
puts 'original tree:'
pp @original_tree
- abort 'Infinite loop detected'
+ puts
+ puts "Infinite loop detected!"
+ puts "Please save this output to an attachment and submit a ticket here:"
+ puts "http://rubyforge.org/tracker/?func=add&group_id=1513&atid=5921"
+ exit 1
else
@last_mutations_left = sum
end
Please sign in to comment.
Something went wrong with that request. Please try again.