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

move definition of String#unicode_normalize! to C to make sure it is documented

* lib/unicode_normalize.rb: Remove definition of String#unicode_normalize!
  (including documentation)
* string.c: Define String#unicode_normalize! in rb_str_unicode_normalize_bang in C,
  (including documentation)
* lib/unicode_normalize/normalize.rb: Remove (re)definition of
  String#unicode_normalize! to avoid warnings (when $VERBOSE==true) and
  problems when String is frozen

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58553 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
duerst 2017-05-04 01:36:52 +00:00
parent 6faa8408e5
commit 90ab1ee023
3 changed files with 23 additions and 17 deletions

View file

@ -160,10 +160,6 @@ module UnicodeNormalize # :nodoc:
end # module
class String # :nodoc:
def unicode_normalize!(form = :nfc)
replace(UnicodeNormalize.normalize(self, form))
end
def unicode_normalized?(form = :nfc)
UnicodeNormalize.normalized?(self, form)
end