summaryrefslogtreecommitdiff
path: root/jni/ruby/ext/-test-/string/enc_associate.c
blob: d6614fb298ff7f3999259a9ba7cb0dc51c5a9d33 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include "ruby.h"
#include "ruby/encoding.h"

VALUE
bug_str_enc_associate(VALUE str, VALUE enc)
{
    return rb_enc_associate(str, rb_to_encoding(enc));
}

void
Init_enc_associate(VALUE klass)
{
    rb_define_method(klass, "associate_encoding!", bug_str_enc_associate, 1);
}