Commit 85ed19ca authored by Jun Hiroe's avatar Jun Hiroe

Fix indent in String#casecmp comments

parent f370a0f0
......@@ -36,16 +36,17 @@ class String
(s == self) ? nil : self.replace(s)
end
# call-seq:
# str.casecmp(other_str) -> -1, 0, +1 or nil
#
# Case-insensitive version of <code>String#<=></code>.
#
# "abcdef".casecmp("abcde") #=> 1
# "aBcDeF".casecmp("abcdef") #=> 0
# "abcdef".casecmp("abcdefg") #=> -1
# "abcdef".casecmp("ABCDEF") #=> 0
#
##
# call-seq:
# str.casecmp(other_str) -> -1, 0, +1 or nil
#
# Case-insensitive version of <code>String#<=></code>.
#
# "abcdef".casecmp("abcde") #=> 1
# "aBcDeF".casecmp("abcdef") #=> 0
# "abcdef".casecmp("abcdefg") #=> -1
# "abcdef".casecmp("ABCDEF") #=> 0
#
def casecmp(str)
self.downcase <=> str.to_str.downcase
rescue NoMethodError
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment