diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-12-16 10:25:21 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-12-16 10:25:21 +0000 |
commit | c5601931c2fa27cf0a38df028654c67163eeb528 (patch) | |
tree | 1d90576d097c02095fc89d9820955659ea2ffd29 /test/ruby/test_io.rb | |
parent | 5515c5642eea08452f57b1bcd90f66a3ee91836c (diff) | |
download | ruby-c5601931c2fa27cf0a38df028654c67163eeb528.tar.gz |
class.c: fix option hash
* class.c (rb_scan_args): if no keywords is given return nil as
the option hash.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44244 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_io.rb')
-rw-r--r-- | test/ruby/test_io.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/ruby/test_io.rb b/test/ruby/test_io.rb index 4dc7599b99..8eb94e367a 100644 --- a/test/ruby/test_io.rb +++ b/test/ruby/test_io.rb @@ -2981,6 +2981,9 @@ End File.unlink(path) IO.write(path, "foo", encoding: Encoding::UTF_32BE) assert_equal("\0\0\0f\0\0\0o\0\0\0o", File.binread(path)) + assert_raise(TypeError) { + IO.write(path, "foo", Object.new => Object.new) + } ensure t.close! end |