summaryrefslogtreecommitdiff
path: root/sample/trick2013/yhara/entry.rb
diff options
context:
space:
mode:
authormame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-12-25 03:45:15 +0000
committermame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-12-25 03:45:15 +0000
commite8052778c18eef07e5ef3403e234923ed5018333 (patch)
tree26b6031c117202b00f1b260df100e0e245e8f178 /sample/trick2013/yhara/entry.rb
parent1e7a929c1d44d7a368fbe379211183ac6c972920 (diff)
* sample/trick2013/: added the award-winning entries of TRICK 2013.
See https://github.com/tric/trick2013 for the contest outline. (Matz has approved the attachment.) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44403 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'sample/trick2013/yhara/entry.rb')
-rw-r--r--sample/trick2013/yhara/entry.rb28
1 files changed, 28 insertions, 0 deletions
diff --git a/sample/trick2013/yhara/entry.rb b/sample/trick2013/yhara/entry.rb
new file mode 100644
index 0000000000..a2deb54399
--- /dev/null
+++ b/sample/trick2013/yhara/entry.rb
@@ -0,0 +1,28 @@
+def _(&b)$><<->(x){x ? (String===x ?x.upcase:
+(Class===x ? x : x.class).name[$a?0:($a=5)]):
+" "}[ begin b[];rescue Exception;$!;end ] end
+
+_ { return }
+_ { method(:p).unbind }
+_ { eval "{ " }
+_ { Thread.current.join }
+_ { nil }
+_ { select }
+_ { ruby }
+_ { self.class }
+_ { Thread.current.group }
+_ { nil.to_h }
+_ { "\xFF".encode("big5") }
+_ { raise }
+_ { [0][1] }
+_ { Regexp.compile "*" }
+_ { RUBY_COPYRIGHT[32] }
+_ { binding }
+_ { :s.class.name[1] }
+_ { warn }
+_ { [a: :b][0] }
+_ { methods }
+_ { IO.class }
+_ { {}.fetch(0) }
+_ { open " " }
+_ { 1000000.chr }