Author Topic: Ruby syntax oddities  (Read 1395 times)

jhaide

  • New Community Member
  • Posts: 1
  • Hero Points: 0
Ruby syntax oddities
« on: December 21, 2011, 06:51:58 pm »
I've been using Slickedit for the past 15 years ... so that probably qualifies me as a diehard fan. Pretty much every new job I started, I made them buy a license for me. Lately I've been doing a lot of Ruby and there are a few annoyances that I'd love to see fixed. (Especially since pretty much every free code editor/IDE seems to get these right).

Code: [Select]
def fish
  return if blah # This 'if' shouldn't match the 'end' of this method, but Slickedit still thinks it does
  while true
    puts 'blah #{should show as a plain string} blah'
    puts "blah #{should show as a ruby expression} blah"
  end
  puts <<HERE
safas
if not
end
asfasf
HERE
end

1. #{} inside a double-quoted string is not recognized. This makes it very hard to debug large embedded SQL strings that have a few of these sprinkled within
2. statement if condition form confuses the block matching code, because it thinks that an if always should have a corresponding end
3. here-documents plain don't work. In the above example the text between the HERE tags is highlighted as if it was proper Ruby.

I'm writing this based on the latest version, 16.0.3.

Thanks for providing us with one of the best code editors available and here's hoping that by fixing these hopefully minor issues you'll make it even better.


« Last Edit: December 21, 2011, 06:54:03 pm by jhaide »