Граф коммитов

14 Коммитов

Автор SHA1 Сообщение Дата
eban 45432a6d2b * golf_prelude.rb: Shorter method name completion. Same method
used for const missing. do_while and do_until added.  Enumerator
  gains all of Array's abilities. Ex:
    '123'.m{|i|i*2} #=> "112233"
    '123'.pe #=> '123'.perm*' ' #=> "123 132 213 231 312 321"
  base on a patch from Darren Smith <darrenks AT ml1.net>.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15046 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-14 13:35:51 +00:00
eban 53ac21c325 * 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
2008-01-09 09:28:19 +00:00
nobu 84e02c8718 * golf_prelude.rb: find words with underscore.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14809 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-31 00:33:40 +00:00
usa 21789d5331 * golf_prelude.rb (String#/): define / as split, as association of
Array#*.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14802 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-30 14:49:22 +00:00
eban 75ee1d5252 * golf_prelude.rb (@@golf_hash): for performance improvement.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14801 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-30 14:20:37 +00:00
eban f413b83814 * golf_prelude.rb (Object.say): derived from Perl 5.10.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14771 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-28 11:20:59 +00:00
usa c48c31a528 * golf_prelude.rb (Integer#each): use alias simply.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14755 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-28 04:59:00 +00:00
knu 7ad2d4cc9a * golf_prelude.rb (Object.const_missing): No need to delegate to
superclass.  Just raise a NameError when none matches.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14754 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-28 04:46:56 +00:00
usa 18ef0fef15 * golf_prelude.rb (Object.quine): need to join because SCRIPT_LINES__[]
returns an array of lines.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14749 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-28 02:39:51 +00:00
usa ec12be8574 * golf_prelude.rb (Object.quine): get the script itself.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14748 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-28 02:18:05 +00:00
knu f1ddd69d7b * golf_prelude.rb (Object.const_missing): Auto-complete constants.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14747 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-28 01:07:21 +00:00
usa b8f8c75579 * golf_prelude.rb (Integer): Integer is now enumerable on goruby.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14745 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-27 16:47:58 +00:00
usa eadfbddd93 * 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
2007-12-25 07:42:53 +00:00
nobu 4496da18a8 * trunk/common.mk, goruby.c, golf_prelude.rb: for golfers.
* trunk/main.c (main): hook for embedding applications.

* trunk/tool/compile_prelude.rb: can change initialize function name.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14676 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-25 07:04:30 +00:00