balmma/ruby-deepclone — pull request #5 by antw (2014-01-21 15:43:53+00:00)
Title: Add support for Ruby 2.1

Ruby 2.1 moves the `iv_index_tbl` attribute into `rb_classext_struct`, defined in internal.h (see: ruby/ruby@34096909). This meant that it was no longer possible to access it directly using `RCLASS_EXT()`. I added support for Ruby 2.1 by casting the struct returned by `RCLASS()` into a new struct, from which we can access `iv_index_tbl` (much like Ruby itself does [in classext.h](https://github.com/ruby/ruby/blob/v1_9_3_484/include/ruby/backward/classext.h)).

Anyway... I compiled and tested the library with Ruby 1.9.3-p484, 2.0.0-p353, and 2.1.0-p0. I haven't been able to test 1.9.3 with the falcon patch, but I don't see any reason for this patch to break it since the only relevant change affecting it is the renamed macros (the added "DC_" prefix).

Thanks!