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

12403 Коммитов

Автор SHA1 Сообщение Дата
knu efa115e451 * enumerator.c (Init_Enumerator): Override
Enumerable::Enumerator#each_with_index with #with_index.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16558 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-23 07:47:54 +00:00
nobu 4baf5c4da6 * vm_dump.c (vm_stack_dump_raw): suppress warnings.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16552 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-23 03:25:30 +00:00
nobu 59432db7f7 * vm_core.h (rb_num_t): moved form vm.h.
* tool/instruction.rb (RubyVM::Instruction#sp_increase_c_expr),
  tool/instruction.rb (RubyVM::VmBodyGenerator#make_header_operands):
  omit unused variables.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16551 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-23 03:23:08 +00:00
nobu 39a86bf60a * .gdbinit (rp): T_VALUES is no longer defined.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16550 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-23 02:38:02 +00:00
nobu 87c828e39e * iseq.c (rb_iseq_compile_with_option): get rid of segv.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16548 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-22 21:15:23 +00:00
kazu e12388713f svn:ignore: added rubyspec
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16546 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-22 19:30:59 +00:00
kazu 7413b9dced trivial change.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16545 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-22 19:30:17 +00:00
nobu e53f813650 * svn:ignore: added GNUmakefile.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16542 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-22 18:16:12 +00:00
ko1 9832ab3663 * insns.def (opt_gt|ge|lt|le): use values directly to compare.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16541 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-22 17:31:15 +00:00
ko1 a45cd8a01c * eval.c, eval_intern.h, include/ruby/intern.h, include/ruby/ruby.h,
vm.c, vm_core.h, vm_insnhelper.c: remove pointless "const".



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16540 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-22 16:19:14 +00:00
mame 846ea1727f * compile.c (get_destination_insn, get_next_insn, get_prev_insn):
peephole optimization should not ignore ISEQ_ELEMENT_ADJUST.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16535 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-22 14:45:54 +00:00
nobu 2b791b2ddd * marshal.c (check_dump_arg, check_load_arg): check if reentered.
[ruby-dev:34802]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16533 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-22 11:20:56 +00:00
mame 6dbf55f1ba * iseq.c (iseq_load, iseq_data_to_ary): support
ISEQ_TYPE_DEFINED_GUARD.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16532 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-22 11:16:40 +00:00
nobu 6f04138f75 * vm.c (sdr, nsdr): define methods only if VMDEBUG is defined.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16531 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-22 10:01:32 +00:00
nobu 571883a217 * vm.c (vm_get_ruby_level_cfp): moved from eval_intern.h.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16530 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-22 09:55:36 +00:00
akr 5fa02c5951 add a test for [ruby-dev:34802].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16529 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-22 08:41:07 +00:00
akr f73c84542c * array.c (rb_ary_compact_bang): fix reallocation size.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16528 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-22 08:19:04 +00:00
akr da5e82f5a3 add a test for Array#compact!.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16527 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-22 08:13:19 +00:00
usa 477c0db2bd * eval_intern.h, vm_core.h, include/ruby/intern.h, include/ruby/ruby.h,
vm.c: need to add const to prototypes, of course.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16526 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-22 06:22:41 +00:00
nobu 00e28c26a7 * array.c (flatten): check if reentered. [ruby-dev:34798]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16525 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-22 05:20:59 +00:00
ko1 559d021d20 * eval.c, vm.c, vm_core.h, vm_insnhelper.c: specify "const".
* vm_opts.h: add a OPT_TOKEN_THREADED_CODE macro.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16524 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-22 04:28:13 +00:00
akr dc217e2d25 * insns.def (newhash): fix a variable definition: "const k".
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16523 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-22 03:52:22 +00:00
nobu feead4dca5 * array.c (flatten): check if reentered. [ruby-dev:34798]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16522 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-22 03:40:57 +00:00
akr a85b247171 * test/ruby/envutil.rb (assert_normal_exit): capture stdout and stderr
of the child process.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16520 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-22 02:40:50 +00:00
matz 9d27c792c2 * array.c (flatten): free memo hash table before raising exception.
[ruby-dev:34789]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16518 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-22 00:57:47 +00:00
nagai 1ef64a6624 * array.c (flatten): fix memory leak.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16517 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-21 21:41:09 +00:00
naruse 404de438af * ext/nkf/nkf-utf8/nkf.c (nkf_str_caseeql): added.
* ext/nkf/nkf-utf8/nkf.c (nkf_enc_find_index): use nkf_str_caseeql.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16515 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-21 21:23:51 +00:00
matz 989c8ed00a * proc.c (proc_dup): should copy safe_level from src proc
properly.  a patch from Keita Yamaguchi
  <keita.yamaguchi at gmail.com>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16513 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-21 20:47:26 +00:00
shugo 79fdbe0519 * lib/net/imap.rb: do not use Thread#raise. [ruby-dev:34739]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16512 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-21 17:47:33 +00:00
mame 2c8dd794e9 * test/ruby/test_require.rb: new tests for library requiring, to
achieve over 90% test coverage of dln.c.

* test/ruby/test_class.rb: add tests to achieve over 90% test coverage
  of class.c.

* test/ruby/test_module.rb: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16510 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-21 15:31:15 +00:00
ko1 4c094940aa * insns.def, vm_insnhelper.c: specify "const".
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16509 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-21 15:18:15 +00:00
ko1 a16e394bbf * bootstraptest/test_eval.rb: fix syntax.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16506 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-21 14:22:24 +00:00
naruse 5dd3a0e2dd * ext/nkf/nkf-utf8/nkf.c (nkf_enc_find_index):
use strcasecmp. [ruby-dev:34787]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16505 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-21 08:48:10 +00:00
matz f827d95685 * array.c (rb_ary_compact_bang): avoid forceful realloc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16504 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-21 07:50:27 +00:00
nobu a5bbd5b8a5 * ChangeLog: reverted logs erased at r16491.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16502 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-21 01:52:15 +00:00
naruse 19337db497 * fix for (rb_enc_get_index(obj) == idx) case.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16501 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-20 22:50:01 +00:00
naruse 102f94455c * string.c (rb_usascii_str_new): use rb_str_new.
* string.c (rb_enc_str_new): ditto.

* string.c (rb_usascii_str_new2): use rb_str_new2.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16500 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-20 22:48:49 +00:00
naruse fe8bb86125 * encoding.c, include/ruby/encoding.h
(rb_enc_associate, rb_enc_associate_index):
  returns obj. [ruby-dev:34778]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16499 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-20 22:26:14 +00:00
naruse 13f20ccda7 * encoding.c (rb_ascii8bit_encoding): use ENCINDEX_ASCII.
* encoding.c, include/ruby/encoding.h (rb_ascii8bit_encindex):
  added.

* encoding.c (rb_locale_encoding): use rb_usascii_encoding().

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16498 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-20 19:21:26 +00:00
usa 1de486b600 * test/ruby/test_file_exhaustive.rb (setup): workaround for Windows
Vista.

	* test/ruby/envutil.rb (rubyexec): now Open3.open3 is supported on
	  Windows.

	* test/ruby/test_process.rb: use ``||'' instead of ``;'' because
	  cmd.exe not support it.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16497 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-20 16:48:32 +00:00
naruse 95698ff2a4 * transcode.c, include/ruby/encodng.h (rb_str_transcode):
C API of encoding conversion for Ruby object.
  VALUE rb_str_transcode(VALUE str, VALUE to).

* transcode.c (str_encode, str_encode_bang):
  rename from rb_tr_transcode or rb_str_transcode_bang.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16496 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-20 16:37:13 +00:00
mame c051ec7bc0 * test/ruby/test_array.rb: fix tests for 64bit CPU.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16494 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-20 14:26:33 +00:00
naruse 5eb4d70c5f * ext/nkf/nkf-utf8/nkf.c (rb_nkf_convert) (nkf_enc_without_bom):
reverted. nkf-utf8/nkf.c should be independent of ruby.

* ext/nkf/nkf.c (options):
  moved from nkf-utf8/nkf.c. 
  override nkf's original settings for Unicode BOM.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16493 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-20 13:10:28 +00:00
matz 8405033139 * string.c (rb_enc_strlen_cr): need to set ENC_CODERANGE_7BIT if
search_nonascii() fails.    [ruby-dev:34751]

* string.c (rb_str_reverse): preserve coderange info if the
  receiver is 7bit string.

* string.c (rb_str_reverse_bang): ditto.

* string.c (rb_str_reverse_bang): should have called
  single_byte_optimizable before rb_str_modify() that clears
  coderange info.

* string.c (tr_trans): handle single bytes more eagerly.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16492 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-20 07:59:33 +00:00
nobu 7992fabaf4 * ext/nkf/nkf.c (rb_nkf_convert), ext/nkf/nkf-utf8/nkf.c
(nkf_enc_without_bom): BOM is not a part of encodings.

* ext/nkf/nkf.c (Init_nkf), ext/nkf/nkf-utf8/nkf.c (options):
  UTF-{16,32} without endian have no sense.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16491 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-20 04:20:53 +00:00
nobu 75aa81b79d * ruby.c (process_options): --dump option exit immediately.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16490 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-20 04:19:27 +00:00
nobu 8afd39ad09 * ruby.c (proc_options, process_options): --dump option.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16488 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-20 03:13:52 +00:00
nobu 0343750b62 * include/ruby/ruby.h (PRI[diouxX]VALUE): printf format for VALUE.
* gc.c (assign_heap_slot): suppress a warning.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16487 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-20 02:36:09 +00:00
ko1 d457fdad2d * eval.c, vm_insnhelper.c: fix cref in instance_eval
and cvar_base search protocol.
* bootstraptest/test_knownbug.rb, test_eval.rb: move soleved test
  and add new tests.
* test/ruby/test_eval.rb: fix tests for spec.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16486 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-19 18:47:56 +00:00
ko1 e07663ec1f * bootstraptest/test_knownbug.rb: fix a test.
"block_given?" returns true if "yield" can be used.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16485 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-19 16:47:42 +00:00