From 07f81c06ca565a25044276bb10833ab15eacf8e0 Mon Sep 17 00:00:00 2001 From: naruse Date: Sat, 12 Dec 2009 16:35:10 +0000 Subject: Add rdoc and test of Encoding#replicate. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26068 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- encoding.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'encoding.c') diff --git a/encoding.c b/encoding.c index 2d50f9f8ac..22a03d0ae4 100644 --- a/encoding.c +++ b/encoding.c @@ -313,6 +313,15 @@ rb_enc_replicate(const char *name, rb_encoding *encoding) return idx; } +/* + * call-seq: + * enc.replicate(name) => encoding + * + * Returns a replicated encoding of _enc whose name is _name_. + * The new encoding should have the same byte structure of _enc_. + * If _name_ is used by another encoding, raise ArgumentError. + * + */ static VALUE enc_replicate(VALUE encoding, VALUE name) { -- cgit v1.2.3