mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
This commit is contained in:
parent
8786b8a282
commit
53ac21c325
2 changed files with 16 additions and 4 deletions
|
@ -1,3 +1,9 @@
|
|||
Wed Jan 9 18:24:39 2008 WATANABE Hirofumi <eban@ruby-lang.org>
|
||||
|
||||
* golf_prelude.rb (Array#to_s): alias to join.
|
||||
|
||||
* golf_prelude.rb (FalseClass#to_s): return "".
|
||||
|
||||
Wed Jan 9 16:59:54 2008 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* string.c (rb_enc_cr_str_buf_cat): fix self appending.
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue