aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-06-11 09:02:11 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-06-11 09:02:11 +0000
commit34b19050b3894d3e6e072f68c112711696dc1c41 (patch)
treeadcb58cdd3da4276818e43c5ba316855e2ebc46f /test
parent6f58118e4c6b688aa8c78b5310c4e2c12c444537 (diff)
downloadruby-34b19050b3894d3e6e072f68c112711696dc1c41.tar.gz
* io.c (io_getc): should be 7bit if ascii. fixes #4557
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32000 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_io_m17n.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/ruby/test_io_m17n.rb b/test/ruby/test_io_m17n.rb
index 86d45a50ae..091b04a5af 100644
--- a/test/ruby/test_io_m17n.rb
+++ b/test/ruby/test_io_m17n.rb
@@ -2060,5 +2060,14 @@ EOT
r.close
end)
end
+
+ def test_getc_ascii_only
+ bug4557 = '[ruby-core:35630]'
+ c = with_tmpdir {
+ open("a", "wb") {|f| f.puts "a"}
+ open("a", "rt") {|f| f.getc}
+ }
+ assert(c.ascii_only?, "should be ascii_only #{bug4557}")
+ end
end