Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # 第一段階(デフォルト)
- def sample(&sample_proc_4)
- puts sample_proc_4.call(2)
- end
- sample { |n| n ** 5 } #=> 32
- # 第二段階
- def sample(&sample_proc_4)
- puts yield(2)
- end
- sample { |n| n ** 5 } #=> 32
- # 第三段階
- def sample
- puts yield(2)
- end
- sample { |n| n ** 5 } #=> 32
Add Comment
Please, Sign In to add comment