--- !ruby/object:RI::MethodDescription
aliases: []
block_params:
comment:
- !ruby/struct:SM::Flow::P
body: Comparison---Returns -1 if other_str is less than, 0 if other_str is equal to, and +1 if other_str is greater than str. If the strings are of different lengths, and the strings are equal when compared up to the shortest length, then the longer string is considered greater than the shorter one. If the variable $= is false, the comparison is based on comparing the binary values of each character in the string. In older versions of Ruby, setting $= allowed case-insensitive comparisons; this is now deprecated in favor of using String#casecmp.
- !ruby/struct:SM::Flow::P
body: <=> is the basis for the methods <, <=, >, >=, and between?, included from module Comparable. The method String#== does not use Comparable#==.
- !ruby/struct:SM::Flow::VERB
body: " "abcdef" <=> "abcde" #=> 1\n "abcdef" <=> "abcdef" #=> 0\n "abcdef" <=> "abcdefg" #=> -1\n "abcdef" <=> "ABCDEF" #=> 1\n"
full_name: String#<=>
is_singleton: false
name: <=>
params: |
str <=> other_str => -1, 0, +1
visibility: public