From: Florian Gilcher Date: 2009-11-08T13:14:39+09:00 Subject: [ruby-core:26614] Re: Add Standard Deviation Function to Math Module On Nov 7, 2009, at 5:00 PM, NARUSE, Yui wrote: > > RBTree doesn't support Ruby 1.9 . > But it really a library for libraries; > abundled library, SortedSet, uses it. > > Moreover to bundle such data structure library encourages Ruby users > to use appropriate data structure. > For example, people who should use RBTree, > but they are just about to play with Hash and Array. > # bundled library by political reason > > If someone has responsibility for bundled RBTree in 1.9, > I agree with it. Note beforehand: I'm neither good at C nor at Ruby internals. For anyone interested to pick it up: porting RBTree to Ruby trunk doesn't seem to be too hard. It consists mostly of replacing things like RSTRING(str)->ptr by RSTRING_PTR(str) (i hope those are still the macros in use). There are some issues because the library still uses rb_inspecting_p in its inspection function. I tried to replace them with rb_exec_recursive and it seems to work somehow, but I'm not sure whether I did it correctly. Some review might be appropriate. Some minor tests concerning inspection still fail and the compiler throws 2 warnings[2]. All in all, it works well for a short slice of work, especially because the test suite is quite good and reassuring. If anyone wants to take over[1]: http://github.com/skade/rbtree Regards, Florian [1]: Because I'm going to bed ;). [2]: http://gist.github.com/229093 , maybe someone can figure them out just by looking hard.