Issue #15994 has been updated by ko1 (Koichi Sasada).

Assignee set to aycabta (aycabta .)
Status changed from Open to Rejected

could you make an issue on github?
https://github.com/ruby/irb

----------------------------------------
Bug #15994: irb miscalculates nest level when typing do keyword
https://bugs.ruby-lang.org/issues/15994#change-80241

* Author: Tietew (Toru Iwase)
* Status: Rejected
* Priority: Normal
* Assignee: aycabta (aycabta .)
* Target version: 
* ruby -v: ruby 2.7.0dev (2019-07-10T18:37:22Z master d57ce99b7d) [x86_64-linux]
* Backport: 2.5: UNKNOWN, 2.6: UNKNOWN
----------------------------------------
While typing `while`, `until` and `for`, IRB miscalculates indent level after typing `do`.

Without `do`, everything OK.
```
irb(main):001:1* while false
irb(main):002:0> end
=> nil
```

Just after typing `do` (before ENTER), nest level increased. (ąŁ is cursor)
```
irb(main):001:2* while false do
irb(main):002:1* end
irb(main):003:1* ąŁ
```
```
irb(main):001:2* until true do
irb(main):002:1* end
irb(main):003:1* ąŁ
```
```
irb(main):001:2* for i in [] do
irb(main):002:1* end
irb(main):003:1* ąŁ
```

It doesn't happen with `then`.
```
irb(main):001:1* if true then
irb(main):002:0> end
=> nil
```

Affected: 2.7.0dev
Unaffected: 2.6.3p62




-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>