couchbase/couchbase-ruby-client — pull request #14 by dbussink (2013-07-17 07:23:08+00:00)
Title: Remove usage of RARRAY_PTR in favor of rb_ary_entry

This improves performance significantly on Rubinius and also improves
compatibility with future CRuby 2.1 which introduces generational
garbage collection.

This results in these arrays not having to be rescanned in Rubinius and
not marked as shady in RBGCENC in CRuby 2.1. It is a good practice to
not use internal data structures here and also I've never seen this
change affect any real world performance out there.

For more discussion, also see:

https://bugs.ruby-lang.org/issues/8399