summaryrefslogtreecommitdiff
path: root/golf_prelude.rb
diff options
context:
space:
mode:
authoreban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-01-09 09:28:19 (GMT)
committereban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-01-09 09:28:19 (GMT)
commit53ac21c325ca360b1f61a21ea6e6660776092b15 (patch)
tree8d184b29a078d404549d42339233399a990eea94 /golf_prelude.rb
parent8786b8a2823d146fbb382305707a24fc09f25618 (diff)
* golf_prelude.rb (Array#to_s): alias to join.
* golf_prelude.rb (FalseClass#to_s): return "". git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14967 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'golf_prelude.rb')
-rw-r--r--golf_prelude.rb14
1 files changed, 10 insertions, 4 deletions
diff --git a/golf_prelude.rb b/golf_prelude.rb
index 114e7db..0e356b2 100644
--- a/golf_prelude.rb
+++ b/golf_prelude.rb
@@ -20,13 +20,19 @@ class Object
puts "#{a}ello, #{b}orld#{c}"
end
- def quine(src = $0)
- SCRIPT_LINES__[src].join
- end
-
alias say puts
end
+class Array
+ alias to_s join
+end
+
+class FalseClass
+ def to_s
+ ""
+ end
+end
+
class Integer
alias each times
include Enumerable