* io.c (io_encoding_set): IO.pipe("euc-jp", nil) should work as
IO.pipe("euc-jp", nil). [ruby-dev:33000] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14974 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
81064a7688
commit
76b247202a
@ -1,3 +1,8 @@
|
|||||||
|
Thu Jan 10 10:15:03 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||||
|
|
||||||
|
* io.c (io_encoding_set): IO.pipe("euc-jp", nil) should work as
|
||||||
|
IO.pipe("euc-jp", nil). [ruby-dev:33000]
|
||||||
|
|
||||||
Thu Jan 10 02:41:22 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
|
Thu Jan 10 02:41:22 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||||
|
|
||||||
* io.c (rb_io_binmode): should not alter encoding. [ruby-dev:32918]
|
* io.c (rb_io_binmode): should not alter encoding. [ruby-dev:32918]
|
||||||
|
1
io.c
1
io.c
@ -5621,6 +5621,7 @@ io_new_instance(VALUE args)
|
|||||||
static void
|
static void
|
||||||
io_encoding_set(rb_io_t *fptr, int argc, VALUE v1, VALUE v2)
|
io_encoding_set(rb_io_t *fptr, int argc, VALUE v1, VALUE v2)
|
||||||
{
|
{
|
||||||
|
if (NIL_P(v2)) argc = 1;
|
||||||
if (argc == 2) {
|
if (argc == 2) {
|
||||||
fptr->enc2 = rb_to_encoding(v1);
|
fptr->enc2 = rb_to_encoding(v1);
|
||||||
fptr->enc = rb_to_encoding(v2);
|
fptr->enc = rb_to_encoding(v2);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user