Question

I wanted to learn something about Continuation, type several examples from some articles with callcc method and I've got the error:

NoMethodError: undefined method `callcc' for main:Object
from (pry):2:in `<main>'

None of articles have mentioned to include continuation library. So how to fix this problem? Thanks

EDIT: ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-linux]

Was it helpful?

Solution

From the fine manual:

Continuation objects are generated by Kernel#callcc, after having required continuation.

OTHER TIPS

You need to require 'continuation'.

require 'continuation'
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top