I was just playing with $SAFE in irb and it said “Maybe IRB bug!!” at
the end. Does anyone know what I’m doing wrong? I’m trying to learn
how $SAFE works by experimenting. Should I just do this in "ruby"
instead of “irb” instead?
[shoujoai@lina rb]$ irb
irb(main):002:0> $SAFE = 1
irb(main):003:0> $SAFE = 2
irb(main):004:0> $SAFE = 3
SecurityError: Insecure operation - eval
eval' from /usr/local/lib/ruby/1.6/irb/workspace.rb:80:inevaluate’
_=' from /usr/local/lib/ruby/1.6/irb.rb:141:ineval_input’
trace_in' from /usr/local/lib/ruby/1.6/irb.rb:141:ineval_input’
signal_status' from /usr/local/lib/ruby/1.6/irb.rb:138:ineval_input’
each_top_level_statement' from /usr/local/lib/ruby/1.6/irb/ruby-lex.rb:243:inloop’
each_top_level_statement' from /usr/local/lib/ruby/1.6/irb/ruby-lex.rb:216:incatch’
each_top_level_statement' from /usr/local/lib/ruby/1.6/irb.rb:136:ineval_input’
start' from /usr/local/lib/ruby/1.6/irb.rb:67:incatch’
from /usr/local/lib/ruby/1.6/irb.rb:67:in `start’
from /usr/local/bin/irb:13Maybe IRB bug!!