Project

General

Profile

Actions

Bug #18234

closed

exit after `binding.irb`

Added by ko1 (Koichi Sasada) over 2 years ago. Updated over 2 years ago.

Status:
Closed
Assignee:
-
Target version:
-
[ruby-core:105512]

Description

exit after binding.irb' calls IRB's exit` and raises an error.

expected:

# binding.irb
exit #=> terminate program

actual just after binding.irb:

binding.irb
exit 
From: /home/ko1/ruby/src/trunk/test.rb @ line 2 :

    1:
 => 2: binding.irb
    3: exit #=> terminate program
    4:
    5: __END__

irb(main):001:0>
/home/ko1/ruby/src/trunk/lib/irb.rb:428:in `throw': uncaught throw :IRB_EXIT (UncaughtThrowError)
        from /home/ko1/ruby/src/trunk/lib/irb.rb:428:in `irb_exit'
        from /home/ko1/ruby/src/trunk/lib/irb/context.rb:480:in `exit'
        from /home/ko1/ruby/src/trunk/lib/irb/extend-command.rb:30:in `irb_exit'
        from /home/ko1/ruby/src/trunk/test.rb:3:in `<main>'
make: *** [uncommon.mk:1242: runruby] Error 1

Not so big issue.

Updated by jeremyevans0 (Jeremy Evans) over 2 years ago

I submitted a pull request to irb to fix this by calling super if UncaughtThrowError is raised by IRB::Context#exit: https://github.com/ruby/irb/pull/298

Actions #2

Updated by jeremyevans (Jeremy Evans) over 2 years ago

  • Status changed from Open to Closed

Applied in changeset git|896626fa02f00831de5db2e3e75aa349a5a84102.


[ruby/irb] Make IRB::Context#exit call super if UncaughtThrowError

Fixes calling exit after binding.irb.

Fixes [Bug #18234]

https://github.com/ruby/irb/commit/4ea8d376f2

Actions

Also available in: Atom PDF

Like0
Like0Like0