summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--test/pathname/test_pathname.rb4
2 files changed, 8 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 3d1de9988d..707c6e3113 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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.
diff --git a/test/pathname/test_pathname.rb b/test/pathname/test_pathname.rb
index 1631403eb2..ccdc5bd8eb 100644
--- a/test/pathname/test_pathname.rb
+++ b/test/pathname/test_pathname.rb
@@ -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