What is the use case for Ruby's %q / %Q quoting methods?
问题 I've been reading through Thomas' Programming Ruby 1.9 and came upon the alternative delimited single and double-quoting methods ( %q / %Q ). I've known of them from other Ruby language references as well. %q/I'm acting like a single-quoted string/ %Q|"I'm acting like a double-quoted string" --Anonymous| I have not been working with Ruby for long, but I have never encountered this quoting method in production code. Other than the obvious ability to avoid internally escaping quotes with