diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-10-20 05:01:02 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-10-20 05:01:02 +0000 |
commit | 6948188f3804e612de498dac654c278a342d49bf (patch) | |
tree | c52107684ac95d3675c38a166cb30b015bfc517f /lib/unicode_normalize | |
parent | 7f652dc6cf444d8d342f6a019faf3b54fa16be67 (diff) | |
download | ruby-6948188f3804e612de498dac654c278a342d49bf.tar.gz |
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
Diffstat (limited to 'lib/unicode_normalize')
-rw-r--r-- | lib/unicode_normalize/normalize.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/unicode_normalize/normalize.rb b/lib/unicode_normalize/normalize.rb index 8bc8c6f607..fa18407a6c 100644 --- a/lib/unicode_normalize/normalize.rb +++ b/lib/unicode_normalize/normalize.rb @@ -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 |