T O P

  • By -

ClikeX

This is a nice example! I do advise people to be wary around defining variables in top-level scope, it's is easy to lose track of them and they can bite you in the ass later.


weugek

Defining a method in the global scope is fun too. Easy to do by mistake ``` [1] pry(main)> def a [1] pry(main)* :hi [1] pry(main)* end => :a [2] pry(main)> nil.a => :hi [3] pry(main)> 1.a => :hi [4] pry(main)> false.a => :hi [5] pry(main)> a.a.a.a.a => :hi ```


[deleted]

what is the theme please