Fix Ruby 2.6 breakage (#255)

Beginless ranges are a Ruby 2.7 feature and should be avoided in this gem which has `required_ruby_version = '> 1.9'`.
This commit is contained in:
Per Lundberg
2022-11-22 13:02:59 +02:00
committed by GitHub
parent ac35c33c44
commit 33caddce20

View File

@@ -51,7 +51,7 @@ module Emoji
SKIN_TONES.map do |modifier|
if idx
# insert modifier before zero-width joiner
raw_normalized[...idx] + modifier + raw_normalized[idx..]
raw_normalized[0...idx] + modifier + raw_normalized[idx..nil]
else
raw_normalized + modifier
end