Steven
Steven

Reputation: 2558

Difference between quit and exit in irb?

Is there any difference between using quit or exit to quit irb?

E.g., are these functionally identical:

irb(main):001:0> quit

and

irb(main):001:0> exit

Upvotes: 3

Views: 389

Answers (1)

sawa
sawa

Reputation: 168071

It seems so.

method(:quit).owner    #=> IRB::ExtendCommandBundle
method(:exit).owner    #=> IRB::ExtendCommandBundle
method(:exit).source_location
#=> ["/usr/local/lib/ruby/2.2.0/irb/extend-command.rb", 28]
method(:quit).source_location
#=> ["/usr/local/lib/ruby/2.2.0/irb/extend-command.rb", 28]
method(:exit) == method(:quit)    #=> true

Upvotes: 8

Related Questions