summaryrefslogtreecommitdiff
path: root/encoding.c
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-05-20 22:50:01 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-05-20 22:50:01 +0000
commit19337db49778988768a5c040413b768b08a026d5 (patch)
tree0663a9e291620a62db8246febec111445f5acc18 /encoding.c
parent102f94455c87eb63ac137217b366be9f60e844d7 (diff)
* fix for (rb_enc_get_index(obj) == idx) case.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16501 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'encoding.c')
-rw-r--r--encoding.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/encoding.c b/encoding.c
index 20d47b1e6f..6e745b5e77 100644
--- a/encoding.c
+++ b/encoding.c
@@ -569,7 +569,7 @@ rb_enc_associate_index(VALUE obj, int idx)
{
/* enc_check_capable(obj);*/
if (rb_enc_get_index(obj) == idx)
- return;
+ return obj;
if (!ENC_CODERANGE_ASCIIONLY(obj) ||
!rb_enc_asciicompat(rb_enc_from_index(idx))) {
ENC_CODERANGE_CLEAR(obj);