Let's say I'm using irb
, and type a = 5
. How do I remove the definition of a
so that typing a
returns a NameError
?
Some context: later I want to do this:
context = Proc.new{}.binding
context.eval 'a = 5'
context.eval 'undef a' # though this doesn't work.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…