1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* test/pathname/test_pathname.rb (test_binread): add assertion to

check encoding.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34516 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nagachika 2012-02-09 14:44:10 +00:00
parent 3b1276eb39
commit 42144fc3bb
2 changed files with 8 additions and 1 deletions

View file

@ -1,3 +1,8 @@
Thu Feb 9 23:41:44 2012 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
* test/pathname/test_pathname.rb (test_binread): add assertion to
check encoding.
Thu Feb 9 16:48:19 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
* ext/dl/dl.c (Init_dl): fix mangled document.

View file

@ -710,7 +710,9 @@ class TestPathname < Test::Unit::TestCase
def test_binread
with_tmpchdir('rubytest-pathname') {|dir|
open("a", "w") {|f| f.write "abc" }
assert_equal("abc", Pathname("a").binread)
str = Pathname("a").binread
assert_equal("abc", str)
assert_equal(Encoding::ASCII_8BIT, str.encoding)
}
end