Tail-recursion in ruby could be realized with some compile options for ruby VM:
RubyVM::InstructionSequence.compile_option = {
:tailcall_optimization => true,
:trace_instruction => false
}
More about Tail-recursion.
RubyVM::InstructionSequence.compile_option = {
:tailcall_optimization => true,
:trace_instruction => false
}
More about Tail-recursion.