зеркало из https://github.com/github/ruby.git
lib/unicode_normalize.rb: Changing method names, see https://bugs.ruby-lang.org/issues/10084#note-7
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48014 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
588bbfd1b4
Коммит
dfb68b3d21
|
@ -1,3 +1,8 @@
|
||||||
|
Sun Oct 19 10:12:12 2014 Martin Duerst <duerst@it.aoyama.ac.jp>
|
||||||
|
|
||||||
|
* lib/unicode_normalize.rb: Changing method names, see
|
||||||
|
https://bugs.ruby-lang.org/issues/10084#note-7
|
||||||
|
|
||||||
Sun Oct 19 10:10:10 2014 Martin Duerst <duerst@it.aoyama.ac.jp>
|
Sun Oct 19 10:10:10 2014 Martin Duerst <duerst@it.aoyama.ac.jp>
|
||||||
|
|
||||||
* lib/unicode_normalize.rb: Changing module name.
|
* lib/unicode_normalize.rb: Changing module name.
|
||||||
|
|
|
@ -5,15 +5,15 @@
|
||||||
require 'unicode_normalize/normalize.rb'
|
require 'unicode_normalize/normalize.rb'
|
||||||
|
|
||||||
class String
|
class String
|
||||||
def normalize(form = :nfc)
|
def unicode_normalize(form = :nfc)
|
||||||
UnicodeNormalize.normalize(self, form)
|
UnicodeNormalize.normalize(self, form)
|
||||||
end
|
end
|
||||||
|
|
||||||
def normalize!(form = :nfc)
|
def unicode_normalize!(form = :nfc)
|
||||||
replace(self.normalize(form))
|
replace(self.normalize(form))
|
||||||
end
|
end
|
||||||
|
|
||||||
def normalized?(form = :nfc)
|
def unicode_normalized?(form = :nfc)
|
||||||
UnicodeNormalize.normalized?(self, form)
|
UnicodeNormalize.normalized?(self, form)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Загрузка…
Ссылка в новой задаче