diff options
| author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-08-24 09:40:31 +0000 |
|---|---|---|
| committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-08-24 09:40:31 +0000 |
| commit | fb2e6dbe840ba348461292f41a33303952790c2c (patch) | |
| tree | 765e064f24cabc75e34e456e8d4f443fd1dff9b1 /transcode.c | |
| parent | ffff30fc87f019bec2e2cd37312508e95918d9a8 (diff) | |
| download | ruby-fb2e6dbe840ba348461292f41a33303952790c2c.tar.gz ruby-fb2e6dbe840ba348461292f41a33303952790c2c.tar.xz ruby-fb2e6dbe840ba348461292f41a33303952790c2c.zip | |
* io.c (rb_io_s_pipe): accept optional hash.
(rb_io_set_encoding): ditto.
(rb_io_extract_modeenc): use rb_econv_opts to initialize
ecopts.
(rb_file_open_generic): ditto.
(rb_file_open_internal): ditto.
(io_encoding_set): new argument: opt.
(argf_set_encoding): copy fptr->encs.opts to argf_ecopts.
* transcode.c (rb_econv_opts): accept Qnil for initialization.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@18817 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'transcode.c')
| -rw-r--r-- | transcode.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/transcode.c b/transcode.c index 34a61c336..15755a07c 100644 --- a/transcode.c +++ b/transcode.c @@ -1709,7 +1709,10 @@ econv_opts(VALUE opt) void rb_econv_opts(VALUE hash, rb_econv_option_t *opts) { - opts->flags = econv_opts(hash); + if (NIL_P(hash)) + opts->flags = 0; + else + opts->flags = econv_opts(hash); } static int |
