Shopify/liquid-c — pull request #2 by dylanahsmith (2014-04-11 17:58:31+00:00)
Title: Avoid storing a pointer to an rb_encoding which may be invalidated.

@csfrancis for review

## Problem

If rb_enc_register gets called by some other extension after liquid-c gets initialized, then the encoding list may get `realloc`ed, invalidating this pointer.

I'm not sure if this is actually the source of the segment faults, but I am sure this is a potential problem.

## Solution

Call rb_utf8_encoding every time the UTF-8 encoding is used to avoid storing a reference to it.