summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--test/ruby/test_io_m17n.rb29
-rw-r--r--version.h2
3 files changed, 34 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 8b0c0fdf5d..57008df041 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Sat Feb 11 03:17:41 2012 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * test/ruby/test_io_m17n.rb (TestIO_M17N#test_{default_mode_on_dosish,
+ default_mode_on_unix,text_mode,binary_mode}): tests for [Bug #5164].
+
Sat Feb 11 03:13:27 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
* transcode.c: enabled econv newline option.
diff --git a/test/ruby/test_io_m17n.rb b/test/ruby/test_io_m17n.rb
index 091b04a5af..01dca47f7f 100644
--- a/test/ruby/test_io_m17n.rb
+++ b/test/ruby/test_io_m17n.rb
@@ -2069,5 +2069,32 @@ EOT
}
assert(c.ascii_only?, "should be ascii_only #{bug4557}")
end
-end
+ def test_default_mode_on_dosish
+ with_tmpdir {
+ open("a", "w") {|f| f.puts}
+ assert_equal("\r\n", IO.binread("a"))
+ }
+ end if /mswin|mingw/ =~ RUBY_PLATFORM
+
+ def test_default_mode_on_unix
+ with_tmpdir {
+ open("a", "w") {|f| f.puts}
+ assert_equal("\n", IO.binread("a"))
+ }
+ end unless /mswin|mingw/ =~ RUBY_PLATFORM
+
+ def test_text_mode
+ with_tmpdir {
+ open("a", "wt") {|f| f.puts}
+ assert_equal("\r\n", IO.binread("a"))
+ }
+ end
+
+ def test_binary_mode
+ with_tmpdir {
+ open("a", "wb") {|f| f.puts}
+ assert_equal("\n", IO.binread("a"))
+ }
+ end
+end
diff --git a/version.h b/version.h
index 7729753f21..9b97f48ae8 100644
--- a/version.h
+++ b/version.h
@@ -1,5 +1,5 @@
#define RUBY_VERSION "1.9.3"
-#define RUBY_PATCHLEVEL 85
+#define RUBY_PATCHLEVEL 86
#define RUBY_RELEASE_DATE "2012-02-11"
#define RUBY_RELEASE_YEAR 2012