From: Nobuyoshi Nakada Date: 2009-11-11T09:21:53+09:00 Subject: [ruby-core:26673] Re: [Feature #2348] RBTree Should be Added to the Standard Library Hi, At Tue, 10 Nov 2009 00:21:45 +0900, Florian Gilcher wrote in [ruby-core:26654]: > thanks for the patch, I applied it with a minor addition > (also matching on HAVE_RB_EXEC_RECURSIVE in pp functions to > use the "old" behaviour instead). Indentation seems broken in rbtree_to_s(). > I expect that the compiler problems are only because of the > flags in extconf.rb or are there other thing I missed? And syntax errors in rbtree_begin_inspect(): char str [strlen(c) + 5]; sprintf(str, "#<%s: ", c); VALUE rb_str = rb_str_new2(str); Dynamic size array and local variable definition after executable statements are C99 features but not allowed in C89. Also C++ style one-line comment in rbtree_to_s(): //if (rb_inspecting_p(self)) > Concerning HAVE_RB_EXEC_RECURSIVE: i looked it up and > rb_inspecting_p is gone since March 2005. Are there > considerable chances of a modern ruby version still in > support that does not have rb_exec_recursive? (1.8.6 > perhaps?) Since there was the code using rb_inspecting_p(). I don't like comment-out for such case. -- Nobu Nakada