简介
面向对象语言,用 rescue 处理异常,用 ensure 做清理,用 retry 重新执行受保护的代码。
使用这门语言的成员
参与的讨论
it, _1 and the block names I still write
Ruby 3.4 adds it for the block parameter, so users.map { it.name } reads almost like a sentence. I like it better than _1, wh…
Pinned values in Ruby patterns
in [expected] will happily match [9] even with expected = 7 sitting right above it. That prints ok, expected=9. It reads like…