Skip to content

Commit

Permalink
Format generated ruby files by ragel using rufo gem
Browse files Browse the repository at this point in the history
Closes #1222
  • Loading branch information
unasuke authored and jeremy committed Apr 13, 2018
1 parent 3f35b37 commit 1a8a477
Show file tree
Hide file tree
Showing 15 changed files with 53,498 additions and 53,469 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ rvm:
env:
global:
- JRUBY_OPTS="--server -J-Xms1500m -J-Xmx1500m -J-XX:+UseConcMarkSweepGC -J-XX:-UseGCOverheadLimit -J-XX:+CMSClassUnloadingEnabled"
- RUBYOPT="-w"
matrix:
- MBCHARS=activesupport
- MBCHARS=builtin
Expand Down
20 changes: 10 additions & 10 deletions lib/mail/multibyte/unicode.rb
Original file line number Diff line number Diff line change
Expand Up @@ -302,16 +302,16 @@ def normalize(string, form=nil)
# See http://www.unicode.org/reports/tr15, Table 1
codepoints = u_unpack(string)
case form
when :d
reorder_characters(decompose_codepoints(:canonical, codepoints))
when :c
compose_codepoints(reorder_characters(decompose_codepoints(:canonical, codepoints)))
when :kd
reorder_characters(decompose_codepoints(:compatability, codepoints))
when :kc
compose_codepoints(reorder_characters(decompose_codepoints(:compatability, codepoints)))
else
raise ArgumentError, "#{form} is not a valid normalization variant", caller
when :d
reorder_characters(decompose_codepoints(:canonical, codepoints))
when :c
compose_codepoints(reorder_characters(decompose_codepoints(:canonical, codepoints)))
when :kd
reorder_characters(decompose_codepoints(:compatability, codepoints))
when :kc
compose_codepoints(reorder_characters(decompose_codepoints(:compatability, codepoints)))
else
raise ArgumentError, "#{form} is not a valid normalization variant", caller
end.pack('U*')
end

Expand Down
Loading

0 comments on commit 1a8a477

Please sign in to comment.