Project

General

Profile

Actions

Bug #16685

closed

IRB auto indent does not work for single-line method definitions

Added by sawa (Tsuyoshi Sawada) about 4 years ago. Updated about 3 years ago.

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

Description

IRB auto indent does not work correctly for single line method definitions within a class. It ends up like this:

irb(main):001:1* class Foo
irb(main):002:1*   def a; end
irb(main):003:1*     def b; end
irb(main):004:0> end
=> :b

I believe it should end up like this:

irb(main):001:1* class Foo
irb(main):002:1*   def a; end
irb(main):003:1*   def b; end
irb(main):004:0> end
=> :b

Updated by jeremyevans0 (Jeremy Evans) about 3 years ago

  • Status changed from Open to Closed

This behavior seems to have been fixed after the release of Ruby 3.0. I'm guessing this fix has already been backported and will make Ruby 3.0.1, but @aycabta (aycabta .) could probably confirm that.

Actions

Also available in: Atom PDF

Like0
Like0