I’m sure that double-quotes only failed because you were already inside a quoted literal (i.e., the argument to the log.debug "..."
statement).
The “magic variable” may work under certain conditions, but it seems like a sketchy unnecessary construct, given the other available methods.