mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
parent
f641179525
commit
14bcf69c9c
5 changed files with 80 additions and 62 deletions
|
@ -17,6 +17,7 @@
|
|||
#include "internal.h"
|
||||
#include "internal/enc.h"
|
||||
#include "internal/encoding.h"
|
||||
#include "internal/error.h"
|
||||
#include "internal/inits.h"
|
||||
#include "internal/load.h"
|
||||
#include "internal/object.h"
|
||||
|
@ -569,7 +570,10 @@ rb_enc_replicate(const char *name, rb_encoding *encoding)
|
|||
static VALUE
|
||||
enc_replicate_m(VALUE encoding, VALUE name)
|
||||
{
|
||||
int idx = rb_enc_replicate(name_for_encoding(&name), rb_to_encoding(encoding));
|
||||
int idx;
|
||||
rb_warn_deprecated_to_remove("3.3", "Encoding#replicate", "the original encoding");
|
||||
|
||||
idx = rb_enc_replicate(name_for_encoding(&name), rb_to_encoding(encoding));
|
||||
RB_GC_GUARD(name);
|
||||
return rb_enc_from_encoding_index(idx);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue