2 ms·
I don't know why it wouldn't have. You should have been able to do: out = parseClosure(curr_page, cnt) { |doc,out| eval(codeStr) } ... def parseC
by bct 19y ago
I don't know why it wouldn't have. You should have been able to do:
out = parseClosure(curr_page, cnt) { |doc,out| eval(codeStr) }
...
def parseClosure(curr_page, cnt)
...
yield(doc, out)
or:
def parseClosure(curr_page, cnt, &codeProc)
There's not much opportunity to use lambda explicity in Ruby because using blocks instead is so easy.
- Readmore 19y agoYou are correct sir! I bow to your ruby-fu! Thanks.