summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_string.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/ruby/test_string.rb b/test/ruby/test_string.rb
index 823c5c7c6d..2beaef3504 100644
--- a/test/ruby/test_string.rb
+++ b/test/ruby/test_string.rb
@@ -633,6 +633,12 @@ class TestString < Test::Unit::TestCase
assert_equal(67, res[2])
end
+ def test_each_codepoint
+ res = []
+ S("ABC").codepoints.each {|x| res << x}
+ assert_equal([65, 66, 67], res)
+ end
+
def test_each_line
save = $/
$/ = "\n"