1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

unicode_normalize/normalize.rb: remove prefix

* lib/unicode_normalize/normalize.rb (hangul_decomp_one): remove
  system hungarian prefix, nonsense in ruby.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48046 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2014-10-20 05:01:02 +00:00
parent 7f652dc6cf
commit 6948188f38

View file

@ -43,11 +43,11 @@ module UnicodeNormalize
## Hangul Algorithm
def self.hangul_decomp_one(target)
sIndex = target.ord - SBASE
return target if sIndex < 0 || sIndex >= SCOUNT
l = LBASE + sIndex / NCOUNT
v = VBASE + (sIndex % NCOUNT) / TCOUNT
t = TBASE + sIndex % TCOUNT
index = target.ord - SBASE
return target if index < 0 || index >= SCOUNT
l = LBASE + index / NCOUNT
v = VBASE + (index % NCOUNT) / TCOUNT
t = TBASE + index % TCOUNT
(t==TBASE ? [l, v] : [l, v, t]).pack('U*') + target[1..-1]
end