I quote: "Maybe IRB bug!"

Hmmm…

irb(main):001:0> $SAFE=1
=> 1
irb(main):002:0> exit
SecurityError: Insecure operation - eval
from /usr/local/lib/ruby/1.8/irb/workspace.rb:81:in eval' from /usr/local/lib/ruby/1.8/irb/workspace.rb:81:inevaluate’
from /usr/local/lib/ruby/1.8/irb/context.rb:197:in evaluate' from /usr/local/lib/ruby/1.8/irb.rb:148:ineval_input’
from /usr/local/lib/ruby/1.8/irb.rb:146:in signal_status' from /usr/local/lib/ruby/1.8/irb.rb:146:ineval_input’
from /usr/local/lib/ruby/1.8/irb.rb:144:in
each_top_level_statement' from /usr/local/lib/ruby/1.8/irb/ruby-lex.rb:219:inloop’
from /usr/local/lib/ruby/1.8/irb/ruby-lex.rb:247:in
each_top_level_statement' from /usr/local/lib/ruby/1.8/irb/ruby-lex.rb:218:incatch’
from /usr/local/lib/ruby/1.8/irb/ruby-lex.rb:218:in
each_top_level_statement' from /usr/local/lib/ruby/1.8/irb.rb:144:ineval_input’
from /usr/local/lib/ruby/1.8/irb.rb:70:in start' from /usr/local/lib/ruby/1.8/irb.rb:69:incatch’
from /usr/local/lib/ruby/1.8/irb.rb:69:in `start’
from /usr/local/bin/irb:13
Maybe IRB bug!!
irb(main):003:0>

Uh… how do I kill a process if `kill ’ doesn’t work?

<:)

Chris

Hi,

···

In message “I quote: “Maybe IRB bug!!”” on 03/04/10, “Chris Pine” nemo@hellotree.com writes:

irb(main):001:0> $SAFE=1

irb does not support $SAFE>0. It is restriction, not bug.

						matz.

kill -9

Chris Pine wrote:

···

Uh… how do I kill a process if `kill ’ doesn’t work?

<:)

Chris

irb does not support $SAFE>0. It is restriction, not bug.

···

----- Original Message -----
From: “Yukihiro Matsumoto” matz@ruby-lang.org


But it wouldn’t let me quit! I had to `kill -9’ it to stop it.

It seems like it could check for the string ‘exit’ before it tries to eval
it. (Perhaps only if $SAFE > 0.) Or it could quit on Control-C if $SAFE >
0. Or it could just check, before it displays the prompt, and quit with an
error message if $SAFE > 0. Just off the top of my head…

Seems like a bug to me,

Chris

Hi,

···

In message “Re: I quote: “Maybe IRB bug!!”” on 03/04/10, “Chris Pine” nemo@hellotree.com writes:

irb does not support $SAFE>0. It is restriction, not bug.

But it wouldn’t let me quit! I had to `kill -9’ it to stop it.

Hmm, it seems like a bug. Platform info please.

						matz.

Hmm, it seems like a bug. Platform info please.

···

----- Original Message -----

Red Hat 7.3

$ irb -v
irb 0.9(02/07/03)

$ ruby -v
ruby 1.8.0 (2003-04-03) [i686-linux-gnu]

It is also difficult on my WinXP machine (ruby 1.7.3): Control-C sometimes
works.

Any other info you want?

Chris

Hi,

···

At Thu, 10 Apr 2003 09:36:44 +0900, Chris Pine wrote:

It is also difficult on my WinXP machine (ruby 1.7.3): Control-C sometimes
works.

All you need is typing EOF. C-d on UNIX, C-z (and Enter) on
Windows.


Nobu Nakada

Try hitting ^D.

						matz.
···

In message “Re: I quote: “Maybe IRB bug!!”” on 03/04/10, “Chris Pine” nemo@hellotree.com writes:

----- Original Message -----
Hmm, it seems like a bug. Platform info please.

Red Hat 7.3

$ irb -v
irb 0.9(02/07/03)

$ ruby -v
ruby 1.8.0 (2003-04-03) [i686-linux-gnu]

Try hitting ^D.

···

----- Original Message -----
From: “Yukihiro Matsumoto” matz@ruby-lang.org


Yep, that worked.

The whole thing feels mighty clumsy, but it rarely comes up and I’m sure
you have much more important things to worry about (as do I), so I’ll drop
it.

(I probably would have guessed it, anyway, if I wasn’t such a Linux newbie.)

Chris

Hi,

···

In message “Re: I quote: “Maybe IRB bug!!”” on 03/04/11, “Chris Pine” nemo@hellotree.com writes:

The whole thing feels mighty clumsy, but it rarely comes up and I’m sure
you have much more important things to worry about (as do I), so I’ll drop
it.

I told your issue to Keiju (the irb author). He will take some
action, once he get spare time and the idea to solve the problem

						matz.