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

9296 Коммитов

Автор SHA1 Сообщение Дата
ko1 8620de6b04 * cont.c (cont_restore_1): fix to check root fiber [ruby-dev:30911].
* test/ruby/test_fiber.rb: add a test.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12457 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-07 03:48:13 +00:00
naruse b60d64b001 * lib/json/common.rb: Ponder offering parse\! method.
* lib/json/editor.rb: be a bit more robust while loading data.
* ext/json/ext/{generator,parser}/extconf.rb:
  add a have_header directive for st.h
* test/json: fix some tests.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12456 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-06 22:38:42 +00:00
ko1 6d2dee14f3 * test_fiber.rb: add a test (Continuation and Fiber).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12455 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-06 18:30:14 +00:00
ko1 d80e7373cf * cont.c (cont_new): add debug message.
* cont.c (cont_restore_1): copy stack information from fiber.
* cont.c (rb_fiber_s_new): fix to mark created fiber.
* test/ruby/test_fiber.rb: add some tests around Thread and Fiber.
* yarvcore.c (thread_free): fix to skip freeing stack if root fiber
  is available.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12454 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-06 18:19:42 +00:00
ko1 ed88975237 * eval_intern.h, eval.c (ruby_init): remove POP_TAG_INIT().
* cont.c (rb_fiber_start): remove zero-clearing tag.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12453 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-06 16:04:02 +00:00
ko1 6c5a50ff33 * insns.def (invokeblock): fix of splat argument.
(splat same as normal method dispatch)



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12452 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-06 11:24:42 +00:00
usa 7e5b2304c5 * insns.def: fixed indentation.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12451 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-06 07:26:27 +00:00
nobu ea05b809b5 * lib/json/pure: set properties.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12450 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-06 05:30:25 +00:00
ko1 bf544c05d2 * eval.c (rb_yield): fix to check Qundef.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12449 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-06 01:57:36 +00:00
ko1 9c0b2b8b65 * test/ruby/test_continuation.rb: add a test for last commit.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12448 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-06 01:56:49 +00:00
ko1 15b31b0d80 * cont.c (rb_cont_call): forbid calling dead fiber with
Cotinuation#call.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12447 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-06 01:55:09 +00:00
nobu a96aacb08c * ext/json, lib/json, test/json: set properties.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12446 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-06 01:54:44 +00:00
ko1 9a524fad38 * compile.c (iseq_compile_each): fix around yield arguments
(with NODE_ARGSCAT).



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12445 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-06 01:51:45 +00:00
nobu b244c0dd3a * ext/json/ext/{generator,parser}/extconf.h: removed intermediate files.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12444 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-06 01:34:08 +00:00
ko1 64ffdb4440 * cont.c (rb_fiber_start): clear th->tag and check error to fix
[ruby-dev:30888] and [ruby-dev:30889].
* eval_intern.h: fix rb_fiber_start() prototype.
* test/ruby/test_fiber.rb: add tests for above.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12443 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-05 17:55:07 +00:00
usa 5f05c269e9 * insnhelper.h, insns.def (DEC_SP): shoudn't use unary minus operator
in pointer operation. some compilers (such as VC++8 x64) cannot deal
	  it with expected way.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12442 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-05 17:39:52 +00:00
ko1 78029f00d5 * parse.y (new_yield), compile.c (iseq_compile_each): fix
passing parameter.
* eval.c, eval_jump.h: simplify rb_yield*.
* proc.c (proc_mark): fix to mark proc->block.proc.
* proc.c (Init_Proc): add Proc#lambda?
* test/ruby/test_lambda.rb: add some tests.
* vm.c (invoke_block): fix to check lambda block or not.
* vm.c (th_yield_setup_args): fix to check arguments size
  when lambda block.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12441 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-05 17:26:00 +00:00
matz d686a73d91 * io.c (rb_f_p): returns arguments to intervene. [ruby-dev:29736]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12440 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-05 07:35:34 +00:00
ko1 203286673d * insns.def (invokeblock): check block is created by lambda
or Proc.new.
* vm.c (block_proc_is_lambda): added.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12439 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-05 07:13:52 +00:00
matz 8ef2289a49 * lib/pp.rb (PP::PPMethods::seplist): revert last change to work
around wrapper bug.  [ruby-dev:30840]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12438 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-05 05:48:45 +00:00
matz 931614a341 * numeric.c (int_round): should not just truncate.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12437 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-05 05:31:05 +00:00
naruse 3c17590061 * ext/nkf/nkf-utf8/nkf.c (kanji_convert): Fix guess fallback.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12436 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-05 05:11:04 +00:00
nobu 243cd204df * call_cfunc.ci (call_cfunc): fixed typo.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12435 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-05 04:59:07 +00:00
nobu 194a01a484 * compile.c: fixed indentation.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12434 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-05 04:49:54 +00:00
nobu 35eb542588 * thread_win32.ci: fixed typo.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12433 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-05 04:30:38 +00:00
nobu 3d3e46d4c7 * call_cfunc.ci: protoized.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12432 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-05 04:27:45 +00:00
nobu 99d65b14b4 * compile.c, dir.c, eval.c, eval_jump.h, eval_method.h, numeric.c,
pack.c, parse.y, re.c, thread.c, vm.c, vm_dump.c, call_cfunc.ci,
  thread_pthread.ci, thread_win32.ci: fixed indentation.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12431 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-05 04:25:10 +00:00
usa f3dfa40734 * 2007-06-04
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12430 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-04 12:48:11 +00:00
naruse 3fe5d6fa54 * ext/nkf: import nkf.c rev:1.124
Support CP10001.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12429 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-04 12:40:51 +00:00
naruse af1c416728 * lib/json.rb, lib/json, ext/json, test/json:
import JSON library.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12428 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-04 12:31:26 +00:00
ko1 6b3ef2249c * cont.c (Fiber#pass): rename to Fiber#yield. Block parameter
of fiber body receive first yield values.
  e.g.: Fiber.new{|x| p x}.yield(:ok) #=> :ok
* cont.c: rename rb_context_t#retval to rb_context_t#value.
* test/ruby/test_fiber.rb: ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12425 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-02 07:48:29 +00:00
ko1 66d4a354a8 * proc.c (Init_Proc): remove a line break.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12424 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-02 07:47:20 +00:00
matz 2c4aff3fe0 * numeric.c (int_round): small optimization to handle bignums.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12423 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-01 16:27:05 +00:00
usa 62872956b6 * insnhelper.h (INC_SP): shouldn't cast ``x'' to unsigned type because
it might be a negative value.

	* insnhelper.h, insns.def: shoudn't use unary minus operator in index
	  operator. some compilers (such as VC++8 x64) cannot deal it with
	  expected way.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12422 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-01 04:05:46 +00:00
nobu b8cb3679bb * numeric.c (num_round): should convert self to Float.
[ruby-dev:30860]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12421 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-01 02:32:17 +00:00
matz 609ebfe51f * numeric.c (flo_round): now takes optional argument to specify
number of digits, like round() in Python/PHP.

* numeric.c (num_round): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12420 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-05-31 17:01:15 +00:00
matz 3d7439d568 * enum.c (each_with_index_i): should work well with continuation.
a patch from sheepman <sheepman AT sheepman.sakura.ne.jp>.
  [ruby-dev:30846]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12419 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-05-31 16:59:12 +00:00
nobu 44475bb208 * lib/benchmark.rb (Benchmark::Job::item): avoid modifying the
argument unintentionally.  [ruby-talk:253676]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12418 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-05-31 08:26:31 +00:00
ko1 284565992f * cont.c (cont_capture): store all local variables in heap
([ruby-dev:30832]).
* vm.c (th_stack_to_heap): added.
* test/ruby/test_continuation.rb: add a test for above.
* eval_intern.h (th_get_ruby_level_cfp): fix to clean code.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12415 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-05-30 05:56:13 +00:00
shugo 426fcba891 * lib/net/imap.rb (ResponseParser#next_token): fixed
error message.

* lib/net/imap.rb (ResponseParser#parse_error): fixed
the condition not to refer @token.symbol unexpectedly.
Thanks, Dick Monahan.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12414 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-05-30 04:39:07 +00:00
shugo 3306e785b5 * lib/net/ftp.rb (Net::FTP#transfercmd): skip 2XX
responses for some FTP servers.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12412 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-05-30 04:25:32 +00:00
nobu daacec2b0e * thread_pthread.ci (thread_timer): must not be applied to trunk.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12411 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-05-30 00:41:32 +00:00
nobu 682a52e61c * eval.c (thread_timer): timer thread should not receive any signals.
submitted by Sylvain Joyeux.  [ruby-core:08546]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12409 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-05-29 19:28:25 +00:00
nobu 87e215b55d * eval.c (rb_eval_cmd): just return if no exceptions.
[ruby-dev:30820]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12408 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-05-29 19:17:18 +00:00
nobu 06eeec8a40 * signal.c (interrupt_init): needs to pass nil for Interrupt.
[ruby-core:11038]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12407 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-05-29 17:13:05 +00:00
nobu 290569b06c * signal.c (trap): fixed segfaults. [ruby-dev:30830]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12406 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-05-29 17:08:37 +00:00
nobu fd9aee1ca3 * gc.c (rb_source_filename, obj_free): supress warnings.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12405 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-05-29 15:49:30 +00:00
nobu a196c4ff5c * gc.c (garbage_collect, yarv_machine_stack_mark): fixed typo.
http://bugs.debian.org/426267


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12404 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-05-29 15:46:01 +00:00
nobu 0d2109239d * parse.y (open_args, arg_ambiguous, parser_warning): should not use
rb_warning in the parser.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12403 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-05-29 15:22:49 +00:00
nobu 82159c813b * win32/win32.c (rb_w32_opendir): removed duplicated code.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12402 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-05-29 03:30:14 +00:00