summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-09-04 01:33:47 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-09-04 01:33:47 +0000
commit747d9b3925b8c20ec42d994637fa9f8cc7f5289c (patch)
tree69762d64a2ca918e0f27afc4c713fd289ae7516c
parent31b054122c0051daef2c051665014b9b3c84a105 (diff)
* io.c (argf_next_argv, argf_set_encoding): copy struct wise.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19115 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog4
-rw-r--r--io.c10
2 files changed, 6 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index 85208c05f7..951c41a64d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Thu Sep 4 10:33:43 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * io.c (argf_next_argv, argf_set_encoding): copy struct wise.
+
Thu Sep 4 09:46:18 2008 Tanaka Akira <akr@fsij.org>
* io.c (rb_scan_open_args): follow rb_str_transcode change.
diff --git a/io.c b/io.c
index 39ee4d7c2f..40975f7753 100644
--- a/io.c
+++ b/io.c
@@ -5883,10 +5883,7 @@ argf_next_argv(VALUE argf)
rb_io_t *fptr;
GetOpenFile(current_file, fptr);
- fptr->encs.enc = argf_enc;
- fptr->encs.enc2 = argf_enc2;
- fptr->encs.flags = argf_ecflags;
- fptr->encs.ecopts = argf_ecopts;
+ fptr->encs = ARGF.encs;
clear_codeconv(fptr);
}
}
@@ -7563,10 +7560,7 @@ argf_set_encoding(int argc, VALUE *argv, VALUE argf)
}
rb_io_set_encoding(argc, argv, current_file);
GetOpenFile(current_file, fptr);
- argf_enc = fptr->encs.enc;
- argf_enc2 = fptr->encs.enc2;
- argf_ecflags = fptr->encs.flags;
- argf_ecopts = fptr->encs.ecopts;
+ ARGF.encs = fptr->encs;
return argf;
}