Skip to content

Improve Ruby symbols

Kevin Hovsäter requested to merge hovsater/dte:ruby-symbols into master

The dte syntax is still very new to me, so I'm not entirely sure how to go about this. Any help would be much appreciated. 🙂

The following examples are the most common use cases of symbols. I've deliberately excluded use cases that I felt were unnecessary to support.

  • Symbols with letters, e.g., :foo
  • Symbols with underscores, e.g., :foo_bar
  • Symbols ending with ! or ?, e.g., :foo! or :foo?
  • Symbols for operators, e.g., :+, -, :!, :==, :!= (does not support ending in ! or ?)
  • Symbol strings, e.g., :"anything goes here" and :'anything goes here'.

Perhaps this is too complex. If that's the case I'd be willing to dumb it down further.

Edited by Kevin Hovsäter

Merge request reports