Note that a does not return.
[1] pry(main)> def m
[1] pry(main)* a = 1
[1] pry(main)* b = 2
[1] pry(main)* a
[1] pry(main)* b #The last evaluated b is the return value of the method
[1] pry(main)* end
=> :m
[2] pry(main)> m
=> 2 #The previously evaluated a is not returned.
Recommended Posts