summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYusuke Endoh <[email protected]>2023-02-26 00:06:24 +0900
committerYusuke Endoh <[email protected]>2023-02-27 11:20:42 +0900
commitb6704201a3ef6a7f07da8d4ca82499710a3eea10 ()
treea674b31db7c5ed73aa2172690bba4c0a7f3a3040
parent2535b1819f910f0e12bf609c72e45f7230a060c9 (diff)
Add all-ruby-quine as a sample code
This sample code works on all release versions of Ruby, from Ruby 0.49.
Notes: Merged: https://.com/ruby/ruby/pull/7380
-rw-r--r--sample/all-ruby-quine.rb24
-rw-r--r--test/test_trick.rb32
2 files changed, 56 insertions, 0 deletions
@@ -0,0 +1,24 @@
@@ -1,6 +1,7 @@
require "test/unit"
require "ripper"
require "envutil"
# This is a test suite for TRICK entries, joke Ruby program contest.
# The programs are very unusual, and not practical.
@@ -212,3 +213,34 @@ class TestTRICK2022 < Test::Unit::TestCase
assert_in_out_err(["-W0", "-c", src], "", ["Syntax OK"])
end
end