heckle
heckle copied to clipboard
Block that always causes a syntax error
I've come across a block of code I can't heckle because it always causes a syntax error. Style issues aside, here's the block:
def my_awesome_method
begin
if true
puts "cool"
end
{}.delete(:whatever)
rescue
puts "weird"
end
end
Heckle tries to replace the block as such:
--- original
+++ mutation
def my_awesome_method
begin
(puts("cool") if true
- { }.delete(:whatever)) rescue puts("weird")
+ # do nothing) rescue puts("weird")
end
end
Not sure if this is an issue directly with heckle or one of the libraries it uses, e.g. ParseTree.