I had come up with a Ruby quine:
eval s=%q(puts"eval s=%q(#{s})")
and claimed it to be the shortest, but a quine originally written for Perl by "Robin Houston" and ported to Ruby by "Sabby and Tabby":
puts <<2*2,2
puts <<2*2,2
2
turned out to be shorter. I wonder if one could prove that a shorter non-zero quine is in fact impossible in Ruby. How would you do that? A zero-length script is a quine per definition in Ruby but that is a trivial corner case that is often discarded. Scripts that read their own input like print IO.read($0)
are not quines, so they don't count.
Just because no shorter one has been posted doesn't make it the shortest. So how can it be proved (like scientifically) that a specific quine is the shortest?