From fa31dda1f839909a96cdcc6339d4674e80173ac2 Mon Sep 17 00:00:00 2001 From: matz Date: Mon, 22 Jun 2009 08:23:30 +0000 Subject: * ext/stringio/stringio.c (strio_each_codepoint): new method. [ruby-core:23949] * ext/stringio/stringio.c (strio_each_codepoint): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23818 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/stringio/test_stringio.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'test/stringio') diff --git a/test/stringio/test_stringio.rb b/test/stringio/test_stringio.rb index 8c72803b45..570f180fc7 100644 --- a/test/stringio/test_stringio.rb +++ b/test/stringio/test_stringio.rb @@ -340,6 +340,11 @@ class TestStringIO < Test::Unit::TestCase assert_equal(%w(1 2 3 4), f.each_char.to_a) end + def test_each_codepoint + f = StringIO.new("1234") + assert_equal([49, 50, 51, 52], f.each_codepoint.to_a) + end + def test_gets2 f = StringIO.new("foo\nbar\nbaz\n") assert_equal("fo", f.gets(2)) -- cgit v1.2.3