Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions lib/unicode_utils/each_grapheme.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ module UnicodeUtils
# UnicodeUtils.each_grapheme("a\r\nb").count => 3
def each_grapheme(str)
return enum_for(__method__, str) unless block_given?
c0 = nil
c0_prop = nil
grapheme = String.new.force_encoding(str.encoding)
str.each_codepoint { |c|
Expand Down Expand Up @@ -77,7 +76,6 @@ def each_grapheme(str)
grapheme = String.new.force_encoding(str.encoding)
end
grapheme << c
c0 = c
c0_prop = c_prop
}
yield grapheme unless grapheme.empty?
Expand Down