From: Kent Dahl Date: 2002-06-05T05:20:00+09:00 Subject: Re: irb bug with $SAFE? Tobias Reif wrote: > Philip Mak wrote: > > 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? > > IIRC: Yes, because irb uses eval. Or spawn of threads that set the $SAFE level and call the methods you want to test. Not for the faint hearted, but nice for learning some $SAFE (and thread) stuff. Just remember to set abort_on_exception for threads, wrap them in begin..rescue..end blocks and use puts statements like mad :-) -- (\[ Kent Dahl ]/)_ _~_ __[ http://www.stud.ntnu.no/~kentda/ ]___/~ ))\_student_/(( \__d L b__/ NTNU - graduate engineering - 4. year ) ( \__\_�|�_/__/ ) _)Industrial economics and technological management( \____/_�_\____/ (____engineering.discipline_=_Computer::Technology___)