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

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
parent 07c9ad1d18
commit 0fe8051252
2 changed files with 7 additions and 2 deletions

View file

@ -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> Mon Oct 20 02:23:27 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
* variable.c (rb_ivar_get), vm_insnhelper.c (vm_getivar): improve * variable.c (rb_ivar_get), vm_insnhelper.c (vm_getivar): improve

View file

@ -34,7 +34,7 @@ class String
## UnicodeNormalize. However, tests didn't show any noticeable speedup ## UnicodeNormalize. However, tests didn't show any noticeable speedup
## when doing this. This comment also applies to the commented out lines ## when doing this. This comment also applies to the commented out lines
## in String#unicode_normalize! and String#unicode_normalized?. ## 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) UnicodeNormalize.normalize(self, form)
end end
@ -46,7 +46,7 @@ class String
# #
def unicode_normalize!(form = :nfc) def unicode_normalize!(form = :nfc)
require 'unicode_normalize/normalize.rb' unless defined? UnicodeNormalize 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)) replace(self.unicode_normalize(form))
end end