summaryrefslogtreecommitdiff
path: root/test/ruby/enc/test_emoji_breaks.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/enc/test_emoji_breaks.rb')
-rw-r--r--test/ruby/enc/test_emoji_breaks.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/ruby/enc/test_emoji_breaks.rb b/test/ruby/enc/test_emoji_breaks.rb
index c96d6088f5..bb5114680e 100644
--- a/test/ruby/enc/test_emoji_breaks.rb
+++ b/test/ruby/enc/test_emoji_breaks.rb
@@ -75,7 +75,7 @@ class TestEmojiBreaks < Test::Unit::TestCase
EMOJI_DATA_FILES.each do |file|
version_mismatch = true
file_tests = []
- IO.foreach(file.fullname, encoding: Encoding::UTF_8) do |line|
+ File.foreach(file.fullname, encoding: Encoding::UTF_8) do |line|
line.chomp!
if $.==1
if line=="# #{file.basename}-#{file.version}.txt"
@@ -84,7 +84,8 @@ class TestEmojiBreaks < Test::Unit::TestCase
raise "File Name Mismatch: line: #{line}, expected filename: #{file.basename}.txt"
end
end
- version_mismatch = false if line =~ /^# Version: #{file.version}/
+ version_mismatch = false if line =~ /^# Version: #{file.version}/ # 13.0 and older
+ version_mismatch = false if line =~ /^# Used with Emoji Version #{EMOJI_VERSION}/ # 14.0 and newer
next if line.match?(/\A(#|\z)/)
if line =~ /^(\h{4,6})\.\.(\h{4,6}) *(;.+)/ # deal with Unicode ranges in emoji-sequences.txt (Bug #18028)
range_start = $1.to_i(16)