I saw this operator in HAML code. I wonder what it is for.
I see the following works:
> ?{
=> \"{\"
> ?\\s
=> \" \"
> ?a
=> \"a\"
Re #2, a place I've found it useful is in conveying that a parameter I'm setting or value I'm testing for is intended to be a single character and not just that this happened to simply be a short string. It's a subtle readability/documentation thing, but worth considering for later maintainers (including myself).