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

27717 Коммитов

Автор SHA1 Сообщение Дата
takano32 ae114a8ee6 * template/Doxyfile.tmpl: remove SHOW_DIRECTORIES and
HTML_ALIGN_MEMBERS lines. They have been obsolete in
  Doxygen version 1.8.2.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37095 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-05 08:20:34 +00:00
ko1 e03d6d9eb8 * ext/objspace/objspace.c: add ObjectSpace#reachable_objects_from.
This method returns an array of objects referenced by given object.
  If given object is special objects such as true/false/nil/Fixnum etc
  then it returns nil. See rdoc for details.
  [ruby-core:39772]
* test/objspace/test_objspace.rb: add a test for this method.
* gc.c: add rb_objspace_reachable_objects_from().
  To make this function, add several member `mark_func_data'
  to rb_objspace_t.  If mark_func_data is not null, then
  gc_mark() calls mark_func_data::mark_func.
* gc.h: export rb_objspace_reachable_objects_from().



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37094 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-05 08:14:09 +00:00
nobu 7cc6bfa329 common.mk: gdb-ruby
* Makefile.in (RUNRUBY_COMMAND): split from RUNRUBY.

* common.mk (gdb-ruby): use runruby.rb to set up library path.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37093 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-05 07:28:32 +00:00
nari c38ee00226 ChangeLog: fix a miss
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37092 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-05 07:25:39 +00:00
nari 271f069c7f * gc.c (chain_finalized_object): remove to check a mark flag and
marking since all objects are certainly unmarked with rest_sweep.

* gc.c (rb_objspace_call_finalizer): remove to mark finalizable
  objects. The sweeping doesn't push T_ZOMBIE objects to the
  freelist.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37091 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-05 07:20:49 +00:00
svn 42fcb804f4 * 2012-10-05
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37090 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-05 00:26:46 +00:00
nobu e2220d19e1 depend: missing dependency
* ext/date/depend: all source files need ruby.h.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37089 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-05 00:26:43 +00:00
nari ec62e30196 * gc.c (init_heap): call init_mark_stack before to allocate
altstack. This change avoid the stack overflow at the signal
  handler on 32bit, but I don't understand reason... [Feature #7095]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37088 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-04 14:48:02 +00:00
ko1 08c8605de9 * insns.def (getlocal, setlocal): remove old getlocal/setlocal
instructions and rename getdaynmic/setdynamic instructions
  to getlocal/setlocal.
* compile.c: ditto.
* iseq.c: remove TS_DINDEX.
* vm_exec.h (dindex_t): remove type definition of `dindex_t'.
* tool/instruction.rb: ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37087 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-04 13:52:20 +00:00
ko1 326e22e14a * vm.c (vm_analysis_insn|operand|register): use st_insert
instead of using rb_hash_aset() because rb_hash_aset()
  check $SAFE.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37086 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-04 12:48:35 +00:00
ko1 23dc0dbc4a * vm.c (VM_COLLECT_USAGE_DETAILS): make new VM usage analysis
hooks (old macro name is COLLECT_USAGE_ANALYSIS).
  This feature is only for VM developers.  (I'm not sure I can use
  `VM developers' (the plural form) in this sentence).
  If VM_COLLECT_USAGE_DETAILS is not 0, VM enables the following
  usage collection features:
  (1) insntruction: collect intruction usages.
  (2) operand: collect operand usages.
  (3) register: collect register usages.
  The results are stored in
  RubyVM::USAGE_ANALYSIS_INSN for (1, 2),
  RubyVM::USAGE_ANALYSIS_INSN_BIGRAM for (1) and
  RubyVM::USAGE_ANALYSIS_REGS for (3).
  You can stop collecting usages with
  RubyVM::USAGE_ANALYSIS_INSN_STOP(),
  RubyVM::USAGE_ANALYSIS_OPERAND_STOP(),
  RubyVM::USAGE_ANALYSIS_REGISTER_STOP()
  for (1), (2), (3) respectively.
  You can also change the hook functions by setting
  C level global variables
  `ruby_vm_collect_usage_func_(insn|operand|register)'
  for (1), (2), (3) respectively.
  See codes for more details.
* tool/instruction.rb: fix macro names.
* iseq.c (insn_operand_intern): make it export (used in vm.c).
  fix to skip several processes if not needed (pointer is 0).
* vm_dump.c: move codes for collection features to vm.c.
* vm_exec.h: rename macro and function names.
* vm_insnhelper.h: ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37085 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-04 12:31:05 +00:00
ko1 b1ad79774d * test/ruby/test_settracefunc.rb (test_tracepoint):
remove unused test case.
  (this test case is redefined by newer tests)



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37084 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-04 10:00:56 +00:00
nari 2f9f17ac98 * gc.c (rb_objspace_call_finalizer): call gc_mark_stacked_objects
at suitable point.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37083 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-04 08:34:20 +00:00
nobu 6aa2aabd8b gc.c: self-referencing finalizers
* gc.c (rb_objspace_call_finalizer): mark self-referencing finalizers
  before run finalizers, to fix SEGV from btest on 32bit.
* gc.c (gc_mark_stacked_objects): extract from gc_marks().

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37082 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-04 07:31:31 +00:00
nobu 6fa2980e53 * gc.c: use enum for debugging.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37081 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-04 07:23:41 +00:00
nobu fab7e66131 thread_pthread.c: precise stack size
* thread_pthread.c (ruby_init_stack): round stack limit to page size
  boundary to calculate stack size more precisely.  [ruby-dev:46174]
  [Bug #7084]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37080 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-04 02:43:30 +00:00
nobu cbe3646e68 * thread_pthread.c (RUBY_STACK_MIN_LIMIT): name magic number.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37079 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-04 02:39:34 +00:00
svn 6ed36284db * 2012-10-04
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37078 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-04 02:21:00 +00:00
xibbar aeca965681 * lib/cgi/html5.rb: Add html5 tag maker.
* lib/cgi/core.rb: ditto.
      [Feature #6637]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37077 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-04 02:20:55 +00:00
nobu 4336caf204 gc.c: unused function
* gc.c (free_stack_chunks): it is used only when per-VM object space
  is enabled.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37076 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-03 13:23:30 +00:00
nari 8d53a08ed8 * gc.c: Use the non-recursive marking instead of recursion. The
recursion marking of CRuby needs checking stack overflow and the
  fail-safe system, but these systems not good at partial points,
  for example, marking deep tree structures. [ruby-dev:46184]
  [Feature #7095]

* configure.in (GC_MARK_STACKFRAME_WORD): removed. It's used by
  checking stack overflow of marking.

* win32/Makefile.sub (GC_MARK_STACKFRAME_WORD): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37075 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-03 12:30:21 +00:00
nobu f6d0cb46f6 ChangeLog: fix typo.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37074 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-03 07:58:00 +00:00
nobu 396903d384 depend: dependency
* ext/json/generator/depend: fix missing dependency.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37073 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-03 07:33:24 +00:00
nobu 54c17dc8a9 thread_pthread.c: init stack with ulimit
* thread_pthread.c (ruby_init_stack): use getrlimit() for the main
  thread on Mac OS X, since pthread_get_stack{addr,size}_np() and
  return the default value always, but not the ulimit value.
  [ruby-dev:46174] [Bug #7084]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37072 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-03 06:33:08 +00:00
nobu 5c677a83ba io.c: improved IO#reopen
* io.c (rb_io_reopen): improvement to accept optional arguments.
  a patch by Glass_saga (Masaki Matsushita) in [ruby-core:47806].
  [Feature #7103]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37071 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-03 02:43:19 +00:00
drbrain 48af304cf7 * ext/openssl/ossl_x509store.c (ossl_x509store_add_file): Added
documentation
* ext/openssl/ossl_x509store.c (ossl_x509store_set_default_paths):
  ditto
* ext/openssl/ossl_x509store.c (ossl_x509store_add_cert):  ditto


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37070 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-02 19:36:26 +00:00
svn a0ead9fca1 * 2012-10-03
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37069 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-02 17:25:21 +00:00
shugo a1ed68b931 * error.c (exc_to_s, name_err_to_s, name_err_mesg_to_str): do not
taint messages.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37068 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-02 17:25:10 +00:00
svn a63bde6d91 * 2012-10-02
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37067 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-02 07:47:17 +00:00
nobu a416367b04 eval.c: hide internal hash
* eval.c (identity_hash_new): hide internal hashes for refinements.
* eval.c (rb_mod_refine): no default value.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37066 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-02 07:47:11 +00:00
nagachika 39ef471e2d * ChangeLog: fix typos of r37064.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37065 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-01 14:52:53 +00:00
shugo e56eb1b163 * eval.c (identify_hash_new): new function to create a new identity
hash.

* eval.c (rb_overlay_module, rb_mod_using, rb_mod_refine): use
  identify_hash_new().

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37064 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-01 13:56:37 +00:00
svn a0f43fad5e * 2012-10-01
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37063 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-30 17:36:14 +00:00
knu 1d695c36b9 * configure.in (--with-opt-dir): Make this also work on DLDFLAGS
so LIBRUBY_SO links fine with libexecinfo installed in a
  non-system directory.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37062 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-30 17:36:09 +00:00
mrkn 0d3cd4119e * vm_dump.c (rb_vm_bugreport): add /Library/Logs/DiagnosticReports
in the list of locations of crash reports.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37061 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-30 14:34:55 +00:00
nagachika 173aacf9ff * test/ruby/test_enumerator.rb (enum_test, test_inspect): remove unused
variable.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37060 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-30 12:32:04 +00:00
svn ab5545ee57 * 2012-09-30
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37059 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-30 12:20:15 +00:00
naruse 64989fa5a2 * string.c (rb_str_concat): use memcpy to copy a string which contains
NUL characters. [ruby-core:47751] [Bug #7090]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37058 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-30 12:20:09 +00:00
shirosaki 4d4800a5a7 envutil.rb: kill child process when timeout
* test/ruby/envutil.rb (EnvUtil#invoke_ruby): kill child process
  before Timeout::Error is raised. rmdir of mktmpdir fails with
  EACCES if child process is alive on Windows.

* test/thread/test_queue.rb (TestQueue): increase timeout.
  This test takes long time on Windows XP.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37057 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-29 11:19:11 +00:00
shirosaki e453cc71a8 test_http.rb: clear environment variables
* test/net/http/test_http.rb (TestNetHTTP#test_proxy_address):
  clear environment variables. If http_proxy environment variable was
  set, the test failed.

* test/net/http/test_http.rb (TestNetHTTP#test_proxy_port): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37056 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-29 11:19:06 +00:00
shirosaki d0df0547c6 drbtest.rb: use :KILL on Windows
* test/drb/drbtest.rb (DRbCore#teardown):
  Use Process.kill :KILL on Windows because Process.kill :INT silently
  fails on Windows 7 and raises EINVAL on Windows XP for spawned
  process with new_pgroup: false.

* test/drb/drbtest.rb (DRbAry#teardown): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37055 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-29 11:19:02 +00:00
shirosaki 6d1220b013 test_unicode_escape.rb: set script encoding
* test/ruby/test_unicode_escape.rb (TestUnicodeEscape#test_basic):
  set script encoding to work with LANG=C. It would work on both
  Windows and Unix. Refix of r37051.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37054 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-29 11:18:57 +00:00
shugo 0954607864 * vm_insnhelper.c (rb_vm_using_modules): use using_modules before
klass to fix method lookup order, and use klass even if klass is
  not a module to make refinements in class_eval invoked on classes
  work.

* eval.c (rb_using_module): accept a class as the second argument.

* eval.c (rb_mod_using, f_using): raise a TypeError if the argument
  is not a module.

* test/ruby/test_refinement.rb: add new tests for the above changes.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37053 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-29 02:21:27 +00:00
svn 039e2a35c2 * 2012-09-29
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37052 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-28 17:32:12 +00:00
shirosaki 93731ef211 * test/ruby/test_unicode_escape.rb (TestUnicodeEscape#test_basic):
Use ruby only on Windows since the test fails on Unix with LANG=C.
  [ruby-core:47709] [Bug #7076]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37051 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-28 17:32:06 +00:00
shirosaki b5de8fcd81 test_unicode_escape.rb: fix test for Windows
* test/ruby/test_unicode_escape.rb (TestUnicodeEscape#test_basic):
  echo command doesn't work properly against non-ascii character on
  Windows with chcp 437. Instead we use ruby.
  [ruby-core:47709] [Bug #7076]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37050 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-28 13:43:06 +00:00
ko1 2adb9fd4a5 * vm_insnhelper.c (vm_setup_method): refactoring.
Remove src_argc and use iseq->arg_size directly.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37049 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-28 08:58:22 +00:00
naruse 948169c5be * lib/rubygems/installer.rb (check_that_user_bin_dir_is_in_path):
test_generate_bin_bindir_with_user_install_warning(TestGemInstaller)
  fails on Windows with msys bash. It makes comparing paths
  case-insensitive.
  pick from upstream to fix a failure of test-all [ruby-core:47711]
  c474edb2f3

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37048 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-28 08:29:21 +00:00
nobu 82491a4f73 vm_insnhelper.c: fix types
* vm_insnhelper.c (vm_setup_method): fix -Wshorten-64-to-32.

* vm_insnhelper.c (vm_base_ptr): fix -Wformat

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37047 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-28 08:11:27 +00:00
shugo de14055d62 * vm_method.c (search_method): copy refinement iclasses to search
superclasses correctly.

* test/ruby/test_refinement.rb: related test.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37046 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-28 06:48:20 +00:00