Skip to content

Commit

Permalink
* golf_prelude.rb (h): add new method for all golfers.
Browse files Browse the repository at this point in the history
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14683 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
unak committed Dec 25, 2007
1 parent c90dbed commit eadfbdd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ChangeLog
@@ -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.
Expand Down
4 changes: 4 additions & 0 deletions golf_prelude.rb
Expand Up @@ -4,4 +4,8 @@ def method_missing m, *a, &b
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

0 comments on commit eadfbdd

Please sign in to comment.