0

Some Ruby code won't fold correctly in Geany.

For example, if I have

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

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

then folding the if folds too much:

First screenshot Second screenshot

Whereas if I use quotation marks around the text and question mark of the Ruby symbol (that is, change :empty? into :"empty?", then it folds correctly:

Third screenshot Fourth screenshot

How can I make Geany fold the code correctly, without having to change :empty? into :"empty?"? Is this a configuration thing, or a bug?

Andrew Grimm
  • 78,473
  • 57
  • 200
  • 338

1 Answers1

2

Current consensus, based on the comments, is that it's just a bug in Geany.

I've created a bug report at https://bugs.launchpad.net/ubuntu/+source/geany/+bug/1337015

Andrew Grimm
  • 78,473
  • 57
  • 200
  • 338