#1058 Geany incorrectly folds Ruby code

v1.25
closed-fixed
v0.21
5
2014-08-14
2014-07-25
Andrew Grimm
No

Some Ruby code won't fold correctly in Geany.

For example, if I have

:::ruby
def validate(arr)
if arr.any?(&:empty?)
fail
end
end

validate(["a", "b", "c"])
validate([""])

then folding the if folds too much.

What I expected to happen: when folding on the if, the "end" correponding to the end of the "validate" method is visible.

What happened instead: when folding on the if, the "end" corresponding to the end of the "validate" method is not visible.

As evidence that what I expected to happen is correct, if you change :empty? into :"empty?", I get the expected behavior.

This happened on Ubuntu 12.04 LTS "Precise Pangolin" - Release amd64.

I've also reported this on the bug tracker for Ubuntu: https://bugs.launchpad.net/ubuntu/+source/geany/+bug/1337015

I haven't tried replicating the issue on more recent versions of Geany.

1 Attachments

Discussion

  • Lex Trotman
    Lex Trotman
    2014-07-25

    • status: open --> pending-wont-fix
     
  • Lex Trotman
    Lex Trotman
    2014-07-25

    Confirmed with Git Geany and latest SCITE.

    This is a problem in the Scintilla editing component (www.scintilla.org), not Geany, as shown by its existance in Scite (which also uses Scintilla).

    Please report the problem to Scintilla upstream.

     
    • labels: --> Scintilla, Ruby
    • status: pending-wont-fix --> closed-fixed
    • assigned_to: Colomban Wendling
    • Fixed in: None --> v1.25
     
  • Fixed with update to Scintilla 3.5.0 [a8a6ef7]