Closed ferrous26 closed 13 years ago
Ok, I changed it.
Explicitly listing the block argument does not make it a required argument; I tested it out on 1.8 and 1.9. Try the following:
def test &block
yield if block
end
test
test do puts 1 end
The performance gain is ~5x faster (both 1.8 and 1.9): https://gist.github.com/888491
Though, the method in the patch is quite large, and so the bottleneck is not because the block argument is explicit.
The changes here are now too small, so I'll open a new pull request later on when the changes become significant enough.
I was going through the handsoap code to get a better understanding of what it does and I noticed some things that seemed very out of place. These changes do not change how handsoap functions or its interface.