2020/01/18 にっき

<=> の返す値を厳密に書こうとすると -1 | 0 | 1 | nil になるのだけど、なぜか -1 のとこでエラーが出ていたので直した

github.com


育てた

github.com

まだ120ぐらい残ってる、今日 String#<=> で悩んで止まってしまった

def <=>: (String other) -> (-1 | 0 | 1 | nil) 
def <=>: (String other) -> Integer? 
def <=>: (untyped other) -> (-1 | 0 | 1 | nil) 
def <=>: (untyped other) -> Integer? 

どれがうれしい?

いいなと思ったらKyashでお金を下さい
20191128011151
GitHubスポンサーも受け付けています
https://github.com/sponsors/hanachin/