mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
rework definition of String#unicode_normalize
simplify String#unicode_normalize in lib/unicode_normalize.rb by redefining it in lib/unicode_normalize/normalize.rb git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58537 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
43ae954f90
commit
42b8713703
2 changed files with 7 additions and 6 deletions
|
@ -159,3 +159,9 @@ module UnicodeNormalize # :nodoc:
|
|||
end
|
||||
|
||||
end # module
|
||||
|
||||
class String # :nodoc:
|
||||
def unicode_normalize(form = :nfc)
|
||||
UnicodeNormalize.normalize(self, form)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue