Skip to content

Commit

Permalink
* io.c (argf_binmode_m): should call rb_io_ascii8bit_binmode() to
Browse files Browse the repository at this point in the history
  set its encoding to ASCII-8BIT.  [ruby-core:24029]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23853 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
matz committed Jun 25, 2009
1 parent f119033 commit 06e3782
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 5 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
Thu Jun 25 17:58:39 2009 Yukihiro Matsumoto <[email protected]>

* 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 <[email protected]>

* instruby.rb: '&' in sed s command's replacement is '\&' in ruby.
Expand Down
5 changes: 3 additions & 2 deletions io.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit 06e3782

Please sign in to comment.