ruby-uebungen/Assignment_029/solution/readme.md

6 lines
179 B
Markdown

# Lösung: Quine
```ruby
p = "p = \"%s\"; puts p %% [ p.gsub(/[\"\\\\]/, '\"' => '\\\"', '\\\\' => '\\\\\\\\') ]"; puts p % [ p.gsub(/["\\]/, '"' => '\\"', '\\' => '\\\\') ]
```