注册并分享邀请链接,可获得视频播放与邀请奖励。

Ryan Lopopolo
@_lopopolo
Principal Engineer, Agentic GCP @googlecloud • prev @OpenAI • Building the future of work. Harness engineering. As an agent influencer, • opinions mine
加入 January 2022
1.2K 正在关注    10.8K 粉丝
TIL [4.0.9] > predicate = Kernel.instance_method(:nil?) => #nil#?()> [4.0.9] > predicate.bind_call(nil) => false There are two defs for nil? in Ruby. The one in Kernel is hard coded to return false, and one on NilClass hard coded to return true. Remarkably elegant! It removes one form of branching by exploiting method dispatch.
显示更多