[DOC] Tweaks for String#eql?

This commit is contained in:
BurdetteLamar 2025-07-30 13:00:33 -05:00 committed by Peter Zhu
parent ff6a8e95b7
commit 6d466a55bd
2 changed files with 19 additions and 11 deletions

View file

@ -4243,17 +4243,7 @@ rb_str_equal(VALUE str1, VALUE str2)
* call-seq:
* eql?(object) -> true or false
*
* Returns +true+ if +object+ has the same length and content;
* as +self+; +false+ otherwise:
*
* s = 'foo'
* s.eql?('foo') # => true
* s.eql?('food') # => false
* s.eql?('FOO') # => false
*
* Returns +false+ if the two strings' encodings are not compatible:
*
* "\u{e4 f6 fc}".encode(Encoding::ISO_8859_1).eql?("\u{c4 d6 dc}") # => false
* :include: doc/string/eql_p.rdoc
*
*/