Oh right, joy. You could define the method differently depending on whether the `encoding` method is available:

<pre>
        if String.method_defined?("encoding")
          VALID_ENCODINGS = [...]
          def validate_string(value)
            # do the stuff
          end
        else
          def validate_string(value)
          end
        end
</pre>