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:
parent
07c9ad1d18
commit
0fe8051252
2 changed files with 7 additions and 2 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue