зеркало из https://github.com/github/ruby.git
lib/unicode_normalize.rb: (unicode_normalize!): change method names
in commented-out code. Followup to r48027. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48039 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
07c9ad1d18
Коммит
0fe8051252
|
@ -1,3 +1,8 @@
|
|||
Mon Oct 20 12:37:37 2014 Martin Duerst <duerst@it.aoyama.ac.jp>
|
||||
|
||||
* lib/unicode_normalize.rb: (unicode_normalize!): change method names
|
||||
in commented-out code. Followup to r48027.
|
||||
|
||||
Mon Oct 20 02:23:27 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* variable.c (rb_ivar_get), vm_insnhelper.c (vm_getivar): improve
|
||||
|
|
|
@ -34,7 +34,7 @@ class String
|
|||
## UnicodeNormalize. However, tests didn't show any noticeable speedup
|
||||
## when doing this. This comment also applies to the commented out lines
|
||||
## in String#unicode_normalize! and String#unicode_normalized?.
|
||||
# String.send(:define_method, :normalize, ->(form = :nfc) { UnicodeNormalize.normalize(self, form) } )
|
||||
# String.send(:define_method, :unicode_normalize, ->(form = :nfc) { UnicodeNormalize.normalize(self, form) } )
|
||||
UnicodeNormalize.normalize(self, form)
|
||||
end
|
||||
|
||||
|
@ -46,7 +46,7 @@ class String
|
|||
#
|
||||
def unicode_normalize!(form = :nfc)
|
||||
require 'unicode_normalize/normalize.rb' unless defined? UnicodeNormalize
|
||||
# String.send(:define_method, :normalize!, ->(form = :nfc) { replace(normalize(form)) } )
|
||||
# String.send(:define_method, :unicode_normalize!, ->(form = :nfc) { replace(unicode_normalize(form)) } )
|
||||
replace(self.unicode_normalize(form))
|
||||
end
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче