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

12039 Коммитов

Автор SHA1 Сообщение Дата
knu ac5b69acb8 * hash.c (rb_hash_delete_if, rb_hash_reject_bang, env_delete_if,
env_reject_bang): Return an enumerator if no block is given.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16006 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-14 08:31:38 +00:00
nobu 6866bce757 * compile.c, compile.h (compile_debug): made runtime option.
* debug.c (ruby_debug_print_indent): returns if debug_level exceeds
  the threashold.

* debug.c (ruby_debug_printf): printf to stderr.

* iseq.c (make_compile_option, make_compile_option_value): added
  debug_level option.

* vm_core.h (rb_compile_option_t): added debug_level.

* vm_core.h (struct iseq_compile_data): added node_level.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16003 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-14 05:34:04 +00:00
matz 6be7386218 * array.c (ary_new): new integer overflow check condition.
suggested by TOYOFUKU Chikanobu <nobu_toyofuku at nifty.com> in
  [ruby-dev:34156].

* array.c (rb_ary_initialize): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15997 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-14 03:58:35 +00:00
nobu b2dde8243b * gc.c (Init_stack): use ruby_init_stack. [ruby-dev:34350]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15996 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-14 03:52:27 +00:00
nobu 01f468d138 * gc.c (rb_objspace_t): packed globals. [ruby-dev:34348]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15995 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-14 03:47:04 +00:00
nobu a39883b74a * gc.c (finalizers): removed. [ruby-dev:34349]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15994 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-14 03:44:15 +00:00
matz db0f83ffc3 bootstraptest/test_knownbug.rb: wrong condition
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15993 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-14 02:20:47 +00:00
mame 0327a222c4 * test/ruby/test_parse.rb: add tests to achieve over 95% test coverage
of parse.y.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15992 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-13 15:52:14 +00:00
knu 181f815591 * enum.c (enum_cycle): Make Enumerable#cycle do a finite loop when
the number of cycles is specified.

* array.c (rb_ary_cycle): Ditto for Array#cycle.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15991 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-13 14:59:55 +00:00
nobu 31a060f7bd * thread_pthread.c (lock_func): should not check interrupts in
blocking region.  [ruby-dev:34378]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15990 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-13 09:52:29 +00:00
matz db0c3eb8c0 bootstraptest/test_knownbug.rb: add tests
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15986 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-12 14:51:09 +00:00
matz 6b36f117f2 * prelude.rb (require_relative): move require_relative from
lib/require_relative.rb.  [ruby-core:16356]

* lib/require_relative.rb: removed.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15985 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-12 14:50:18 +00:00
nobu 7b4a171158 * eval.c (ruby_exec_node, ruby_run_node), ruby.c (process_options):
use iseq instead of NODE.

* gc.c (source_filenames): removed.

* include/ruby/intern.h, parse.y (yycompile, parser_mark, parser_free,
  ripper_initialize): rb_source_filename() is no longer used.

* compile.c, compile.h (ERROR_ARGS), parse.y (node_newnode, fixpos,
  parser_warn, e_option_supplied, warn_unless_e_option, range_op,
  cond0): nd_file is no longer used.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15983 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-12 03:41:51 +00:00
drbrain e72b71d56a Update to RubyGems 1.1.1 r1701.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15980 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-11 20:57:02 +00:00
nobu 0ae6c7f816 * file.c (file_expand_path): set external encoding.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15979 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-11 18:13:40 +00:00
nobu 23bb4d7898 * file.c (rb_file_s_basename, rb_file_s_dirname, rb_file_s_extname):
copy encoding.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15978 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-11 18:12:18 +00:00
matz 3734fd0e79 * enum.c (count_i): modified to shut warning up.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15975 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-11 08:36:47 +00:00
knu f9c5484cc5 * enum.c (count_i, count_iter_i, enum_count, enum_find_index):
Reduce code.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15974 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-11 08:26:45 +00:00
matz f79e9281ff * enum.c (find_index_i): modified to shut warning up.
* enum.c (find_index_iter_i): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15973 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-11 08:06:31 +00:00
knu 033a32b4c1 * enum.c (enum_find_index): Add support for find_index(obj);
[ruby-dev:34313].

* array.c (rb_ary_index): Define find_index as an alias to index.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15972 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-11 07:58:06 +00:00
nobu fd0aaf71dc * test/test_pstore.rb, test/yaml/test_yamlstore.rb: properties.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15971 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-11 07:56:25 +00:00
matz 3f03878309 * lib/yaml/store.rb (YAML::load): modified to support empty
database.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15970 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-11 07:43:31 +00:00
matz 4a407ec3a7 * marshal.c (w_object): add volatile to avoid potential GC bug. a
patch from Tomoyuki Chikanaga <chikanag at nippon-control-system.co.jp>
  in [ruby-dev:34311].

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15966 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-10 23:10:49 +00:00
matz 1e8ec51e8f * lib/pstore.rb (PStore::dump, PStore::load): allow subclass
overriding.  [ruby-dev:34305]

* lib/yaml/store.rb (YAML::Store::marshal_dump_supports_canonical_option?): 
  add a method to support faster PStore.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15964 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-10 14:10:19 +00:00
matz df033c0632 * test/test_generator.rb: removed as well. [ruby-dev:34306]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15963 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-10 13:41:21 +00:00
knu 8d321f00e1 Add a bug#.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15962 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-10 11:39:25 +00:00
knu 69327a9d2e * misc/rdebug.el, misc/README: Remove rdebug.el as per request
from the maintainer and mention the ruby-debug project at
  RubyForge in README.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15960 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-10 11:37:46 +00:00
knu 4a1d5cfafe Mention the ruby-debug project at RubyForge.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15959 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-10 11:36:29 +00:00
knu b93bb68a3a * eval.c (rb_f_loop): Mention StopIteration in the document.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15953 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-10 10:42:14 +00:00
knu e8b41deead Fix mistake in the previous commit.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15951 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-10 10:34:49 +00:00
knu c04ad1d7e4 * array.c (rb_ary_pop_m, rb_ary_shift_m): Update documents for
#pop() and #shift().

* array.c (rb_ary_slice_bang): Update document.  Assigning
  array[*args]= nil no longer removes elements.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15950 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-10 10:25:44 +00:00
akr 7132a4f979 * marshal.c (w_object): TYPE_USERDEF assigns id for ivars first.
[ruby-dev:34159] by nagachika.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15949 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-10 08:41:46 +00:00
matz 1d63f4eead * lib/pstore.rb: replaced by Hongli Lai's faster version.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15948 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-10 07:12:41 +00:00
matz db4a767d25 * lib/generator.rb: removed obsolete library. [ruby-core:16233]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15947 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-10 06:06:49 +00:00
nobu eb18a827fb * thread_pthread.c (native_sleep): sleep_cond is initialized at
creation.  [ruby-Patches-19361].


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15945 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-10 01:27:25 +00:00
nobu 69352c0d4d * thread.c (lock_func): optimized and checks for interrupt_flag.
based on a patch from Sylvain Joyeux in [ruby-Patches-19361] and
  [ruby-Patches-19362].


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15931 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-09 05:43:29 +00:00
nobu 5098d7ae0d * test/ruby/test_thread.rb: new tests from Sylvain Joyeux in
[ruby-Patches-19361].


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15930 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-09 03:12:03 +00:00
nobu 0852b7743b * thread.c (lock_func): optimized. based on a patch from Sylvain
Joyeux in [ruby-Patches-19362].


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15929 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-08 12:38:57 +00:00
nobu d7b8efd872 * thread.c (rb_mutex_sleep): ensures to re-acquire at waking up.
[ruby-Patches-19361]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15928 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-08 12:36:42 +00:00
matz 298d20c25b * lib/complex.rb: remove Math first before overwriting by CMath.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15926 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-08 02:01:07 +00:00
matz 1dcbd6921e * re.c (rb_reg_quote): should always copy the quoting string.
[ruby-core:16235]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15925 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-08 01:53:35 +00:00
matz 502e19fd10 * load.c (rb_require_safe): should check fname path after $SAFE is
properly set.  [ruby-dev:34268]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15923 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-08 01:40:49 +00:00
nobu 7dc26509c6 * common.mk (prelude.c): depends on enc/prelude.rb.
* enc/prelude.rb: fixed initial library names.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15922 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-08 01:30:31 +00:00
nobu 2d9e9c3fd7 * bootstraptest/test_autoload.rb: tests for [ruby-dev:34268].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15921 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-07 23:33:01 +00:00
nobu 37504dc560 * load.c (rb_provided): check expanded path for relative path
features, loading or loaded features are already expanded in 1.9.

* variable.c (rb_autoload_load): no needs to check if provided before
  rb_require_safe.  [ruby-dev:34266]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15920 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-07 18:39:28 +00:00
tadf 0c8bc11d3d trivial change.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15919 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-07 14:18:50 +00:00
tadf 4e046758f5 * numeric.c: cancelled recent changes (except to remove rdiv).
* bignum.c: ditto.

	* bignum.c: added rb_big_idiv.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15918 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-07 13:52:26 +00:00
nobu ba9c34e2ad * ignores all libruby stuffs.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15916 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-07 07:06:32 +00:00
nobu 1369cfd16e * encoding.c (enc_init_db): moved to enc/encdb.c.
* transcode.c (init_transcoder_table): moved to enc/trans/transdb.c.

* enc/depend (enc/encdb.o enc/trans/transdb.o): depend on
  corresponding headers.

* common.mk (COMMONOBJS): moved transcode.o from OBJS


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15915 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-07 06:51:33 +00:00
ko1 3f3fdb4869 * bootstraptest/test_knownbug.rb: add a known-bug.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15914 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-07 03:28:23 +00:00