summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-06-25 09:01:45 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-06-25 09:01:45 +0000
commited49d2031f2d68fe320e4f493b5f19171a1e1f6a (patch)
tree49c332a876e7e1fa3ee62082b84a6eae37907b15
parent5eed1c32337388cfddb576799131c251b66f3452 (diff)
downloadruby-ed49d2031f2d68fe320e4f493b5f19171a1e1f6a.tar.gz
ruby-ed49d2031f2d68fe320e4f493b5f19171a1e1f6a.tar.xz
ruby-ed49d2031f2d68fe320e4f493b5f19171a1e1f6a.zip
* io.c (argf_binmode_m): should call rb_io_ascii8bit_binmode() to
set its encoding to ASCII-8BIT. [ruby-core:24029] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@23853 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--io.c5
2 files changed, 8 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 29004a398..2657ee743 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Thu Jun 25 17:58:39 2009 Yukihiro Matsumoto <matz@ruby-lang.org>
+
+ * io.c (argf_binmode_m): should call rb_io_ascii8bit_binmode() to
+ set its encoding to ASCII-8BIT. [ruby-core:24029]
+
Thu Jun 25 13:04:58 2009 NAKAMURA Usaku <usa@ruby-lang.org>
* instruby.rb: '&' in sed s command's replacement is '\&' in ruby.
diff --git a/io.c b/io.c
index b16428e82..c6630fcd7 100644
--- a/io.c
+++ b/io.c
@@ -6533,7 +6533,7 @@ argf_next_argv(VALUE argf)
}
ARGF.current_file = prep_io(fr, FMODE_READABLE, rb_cFile, fn);
}
- if (ARGF.binmode) rb_io_binmode(ARGF.current_file);
+ if (ARGF.binmode) rb_io_ascii8bit_binmode(ARGF.current_file);
if (ARGF.encs.enc) {
rb_io_t *fptr;
@@ -8604,7 +8604,8 @@ argf_binmode_m(VALUE argf)
ARGF.binmode = 1;
next_argv();
ARGF_FORWARD(0, 0);
- rb_io_binmode(ARGF.current_file);
+ rb_io_ascii8bit_binmode(ARGF.current_file);
+
return argf;
}