我怎么能做这样的事情?
1.9.3p286 :006 > defined? activated_flag
=> nil
1.9.3p286 :007 > puts (activated_flat ? "activated!" : "no activated")
我想在这里看到no activated
,但我有:
NameError: undefined local variable or method `activated_flat' for main:Object
from (irb):7
from /Users/fguillen/.rvm/rubies/ruby-1.9.3-p286/bin/irb:16:in `<main>'