From: "Wolfgang Nádasi-Donner" Date: 2009-03-10T04:26:51+09:00 Subject: [ruby-core:22785] Re: [Feature #1256] Add constant TAILRECURSION to let a program recognize if tail recursion optimization is implemented Nobuyoshi Nakada schrieb: > Hi, > > At Mon, 9 Mar 2009 02:41:55 +0900, > Wolfgang N�dasi-Donner wrote in [ruby-core:22748]: >> Tail recursion optimization is an implementation detail and >> not a language feature in general. I propose to supply a >> constant TAILRECURSION, which will be set to "true" if this >> feature is implemented, otherwise "false". > > RubyVM::InstructionSequence.compile_option[:tailcall_optimization] > Thank you for this information. I saw that it still exists in Ruby 1.9.1-p0. Yesterday I tried to compile Ruby 1.9.1-p0 with changes named by Nobuyoshi Nakada. In vm_opts.h I changed #define OPT_TAILCALL_OPTIMIZATION 0 to #define OPT_TAILCALL_OPTIMIZATION 1 Afterwards I rebuilt Ruby, but the stack overflow for both examples I posted before are still there. Should I change additional things in the source? Wolfgang N�dasi-Donner