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:
duerst 2014-10-20 03:37:39 +00:00
Родитель 07c9ad1d18
Коммит 0fe8051252
2 изменённых файлов: 7 добавлений и 2 удалений

Просмотреть файл

@ -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