mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* golf_prelude.rb (h): add new method for all golfers.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14683 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
c90dbedbb1
commit
eadfbddd93
2 changed files with 8 additions and 0 deletions
|
@ -1,3 +1,7 @@
|
|||
Tue Dec 25 16:41:57 2007 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||
|
||||
* golf_prelude.rb (h): add new method for all golfers.
|
||||
|
||||
Tue Dec 25 16:37:12 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* enc/trans/japanese.c (rb_to_EUC_JP): fixed typo.
|
||||
|
|
|
@ -4,4 +4,8 @@ class Object
|
|||
t = (methods + private_methods).sort.find{|e|r=~e}
|
||||
t ? __send__(t, *a, &b) : super
|
||||
end
|
||||
|
||||
def h(a='H', b='w', c='!')
|
||||
puts "#{a}ello, #{b}orld#{c}"
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue