0 replies on 1 page.
Koichi Sasada says if you can predict the correct output of the following, you are a great Ruby hacker. Man, that’s true!
Const = :top class C Const = :C end C.instance_eval %{p Const} C.instance_eval {p Const} C.module_eval %{p Const} C.module_eval {p Const} C.class_eval %{p Const} C.class_eval {p Const} eval %{p Const} eval {p Const}
Even if you don’t get the answers right, I will call you a great Ruby hacker if you can explain it. (As usual: ~sasada.)
Read: Koichi's Brief Ruby Certification