diff options
| author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-01-01 08:50:49 +0000 |
|---|---|---|
| committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-01-01 08:50:49 +0000 |
| commit | 926f1f6c0683da5b7764dbd3184770c758b1465e (patch) | |
| tree | 542047c6376c76d72919317b0348778e0a608014 | |
| parent | 13b25df85eb23962b11613a7542fcc592b3fa332 (diff) | |
| download | ruby-926f1f6c0683da5b7764dbd3184770c758b1465e.tar.gz ruby-926f1f6c0683da5b7764dbd3184770c758b1465e.tar.xz ruby-926f1f6c0683da5b7764dbd3184770c758b1465e.zip | |
* io.c (rb_io_mode_enc): encoding spec is not allowed in binary mode.
[ruby-dev:32913]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@14828 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
| -rw-r--r-- | ChangeLog | 5 | ||||
| -rw-r--r-- | io.c | 3 |
2 files changed, 8 insertions, 0 deletions
@@ -1,3 +1,8 @@ +Tue Jan 1 17:50:47 2008 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * io.c (rb_io_mode_enc): encoding spec is not allowed in binary mode. + [ruby-dev:32913] + Tue Jan 1 14:41:56 2008 Yukihiro Matsumoto <matz@ruby-lang.org> * lib/rexml: 1.9 patch from Sam Ruby mentioned in his blog: @@ -3192,6 +3192,9 @@ rb_io_mode_enc(rb_io_t *fptr, const char *mode) { const char *p = strchr(mode, ':'); if (p) { + if (fptr->mode & FMODE_BINMODE) { + rb_raise(rb_eArgError, "encoding in binary mode"); + } mode_enc(fptr, p+1); } } |
