[scintilla:bugs] #2211 Ruby - folding not work for elsif/else part

1 view
Skip to first unread message

Arkadiusz MIchalski

unread,
Oct 2, 2020, 2:37:36 PM10/2/20
to scintill...@googlegroups.com

[bugs:#2211] Ruby - folding not work for elsif/else part

Status: open
Group: Bug
Created: Fri Oct 02, 2020 06:37 PM UTC by Arkadiusz MIchalski
Last Updated: Fri Oct 02, 2020 06:37 PM UTC
Owner: nobody

Looks like folding for if statemet is not support for elsif/else part.

Code to reproduce:

if expr1 === _tmp || expr2 === _tmp
   stmt1
elsif expr3 === _tmp || expr4 === _tmp
   stmt2
else
   stmt3
end

class Myclass
    def initialize(x,y)
        if x
            y
        elsif y
            x
        end
    end
end

Proper behaviour you can check in Visual Studio Code or online compiler:
https://www.tutorialspoint.com/execute_ruby_online.php


Sent from sourceforge.net because scintill...@googlegroups.com is subscribed to https://sourceforge.net/p/scintilla/bugs/

To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/scintilla/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list.

Arkadiusz MIchalski

unread,
Oct 2, 2020, 2:47:44 PM10/2/20
to scintill...@googlegroups.com

Same is for case statement:

def describe(inhabitant)
  case inhabitant
  when "sophie"
    puts 'gender: female'
    puts 'height: 145'
  when "paul"
    puts 'gender: male'
    puts 'height: 145'
  when "dawn"
    puts 'gender: female'
    puts 'height: 170'
  when "brian"
    puts 'gender: male'
    puts 'height: 180'
  else
    puts 'species: Trachemys scripta elegans'
    puts 'height: 6'
  end
end

Neil Hodgson

unread,
Oct 2, 2020, 4:56:47 PM10/2/20
to scintill...@googlegroups.com
  • labels: --> lexer, ruby
  • status: open --> open-rejected
  • Priority: 5 --> 4
  • Comment:

Whether to fold else clauses is a matter of opinion. Some lexers, including cpp offer '...fold.at.else' options to control this.

Not folding else clauses is not a bug.


[bugs:#2211] Ruby - folding not work for elsif/else part

Status: open-rejected
Group: Bug
Labels: lexer ruby

Created: Fri Oct 02, 2020 06:37 PM UTC by Arkadiusz MIchalski

Last Updated: Fri Oct 02, 2020 06:47 PM UTC
Owner: nobody

Arkadiusz MIchalski

unread,
Oct 2, 2020, 5:19:23 PM10/2/20
to scintill...@googlegroups.com

Ok thanks for the clarification.


[bugs:#2211] Ruby - folding not work for elsif/else part

Status: open-rejected


Group: Bug
Labels: lexer ruby

Created: Fri Oct 02, 2020 06:37 PM UTC by Arkadiusz MIchalski

Last Updated: Fri Oct 02, 2020 08:56 PM UTC
Owner: nobody

Neil Hodgson

unread,
Jul 5, 2026, 9:49:45 PMJul 5
to scintill...@googlegroups.com
  • status: open-rejected --> closed-rejected

[bugs:#2211] Ruby - folding not work for elsif/else part

Status: closed-rejected


Group: Bug
Labels: lexer ruby

Created: Fri Oct 02, 2020 06:37 PM UTC by Arkadiusz MIchalski

Last Updated: Fri Oct 02, 2020 09:19 PM UTC
Owner: nobody

Reply all
Reply to author
Forward
0 new messages