rubyのスコープ気持ち悪いと思うんだけどなんかいい感じの解説ない?
例えばこれとか
def test
if true
result = 1
end
result
end
#=> 1
なんかめっちゃ違和感ある