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

33660 Коммитов

Автор SHA1 Сообщение Дата
nobu 9f45081627 ruby/ruby.h: add blockarg to rb_block_call_func
* include/ruby/ruby.h (rb_block_call_func): add blockarg.  block
  function can take block argument, e.g., proc {|&blockarg| ...}.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43907 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-29 02:26:48 +00:00
svn 93bfdb9dfd * 2013-11-29
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43906 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-29 01:57:09 +00:00
a_matsuda 19c9a70a07 * lib/racc/parser.rb: Fix typo
s/Extentions/Extensions/

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43905 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-29 01:57:04 +00:00
a_matsuda 2e9230c4b3 * lib/gserver.rb: [DOC] Fix typo
s/FixNum/Fixnum/

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43903 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-28 14:36:07 +00:00
zzak 7d4fa2f20b * doc/dtrace_probes.rdoc: [DOC] Import dtrace probes doc from wiki
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43902 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-28 12:44:38 +00:00
zzak 6bea00dc32 * doc/contributing.rdoc: [DOC] Add heading above ChangeLog tips to
setup entry for commits, its not required. Actually easier if
  contributors don't include a ChangeLog entry.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43901 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-28 12:18:35 +00:00
zzak 8274df3e89 * doc/contributing.rdoc: [DOC] Add coding style heading for patch
rules


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43900 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-28 12:17:11 +00:00
zzak f1ea832fa0 * doc/contributing.rdoc: [DOC] Add notes about deciding what to patch
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43899 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-28 12:15:59 +00:00
glass 2fbe9eacf7 * benchmark/bm_hash_flatten.rb: added. r43896 is about 4 times faster
than 2.0.0p353.

* benchmark/bm_hash_keys.rb: added. r43896 is about 5 times faster
  than 2.0.0p353.

* benchmark/bm_hash_values.rb: added. r43896 is about 5 times faster
  than 2.0.0p353.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43898 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-28 10:50:41 +00:00
zzak 85076c0160 * doc/contributing.rdoc: [DOC] Add notes about slideshow proposals
from wiki page: HowToRequestFeatures


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43897 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-28 10:29:54 +00:00
glass 743305413d * ChangeLog: fix typo.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43896 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-28 08:46:19 +00:00
glass 79e6336495 * st.c: add st_values() and st_values_check().
* include/ruby/st.h: add prototypes for above.

* hash.c (rb_hash_values): use st_values_check() for performance
 improvement if VALUE and st_data_t are compatible.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43895 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-28 08:39:16 +00:00
glass 78cfcbc657 * st.c (st_keys): fix not to use Qundef in st.c.
* include/ruby/st.h: define modified prototype.

* hash.c (rb_hash_keys): use modified st_keys().

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43894 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-28 08:15:26 +00:00
tmm1 d7009f76ef * gc.c: Expose details about last garbage collection via GC.stat.
* gc.c (gc_stat): Add :last_collection_flags for reason/trigger/type of
  last GC run.
* gc.c (gc_prof_sweep_timer_stop): Record HAVE_FINALIZE GPR even
  without GC_PROFILE_MORE_DETAIL.
* gc.c (gc_profile_flags): Add GC::Profiler.decode_flags to make sense
  of GC.stat[:last_collection_flags]
* test/ruby/test_gc.rb (class TestGc): Test for above.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43893 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-28 07:40:35 +00:00
nobu 6de07f1fbe version.c: EXIT_SUCCESS
* version.c (ruby_show_copyright): use EXIT_SUCCESS instead of magic
  number 0.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43892 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-28 07:34:18 +00:00
nobu c26bc976bd optparse.rb: regexp at lhs
* lib/optparse.rb (OptionParser::Switch#compsys): regexp literal
  should be lhs of =~.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43891 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-28 07:34:15 +00:00
nobu 21f81885ab win32.c: rb_w32_dup2
* win32/win32.c (rb_w32_dup2): extract from rb_cloexec_dup2() and
  redirect_dup2().

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43890 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-28 07:15:56 +00:00
a_matsuda b3ffb68b5b * lib/drb/ssl.rb: [Doc] Fix typo
s/Confg/Config/

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43889 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-28 05:44:29 +00:00
nobu 72807178f3 common.mk: use BASERUBY
* common.mk (Doxyfile): tool/file2lastrev.rb needs running with
  BASERUBY since r43617.  [ruby-dev:47823] [Bug #9169]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43888 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-28 04:56:08 +00:00
ko1 d7df3e2830 * string.c (rb_fstring): fstrings should be ELTS_SHARED.
If we resurrect dying objects (non-marked, but not swept yet),
  pointing shared string can be collected.
  To avoid such issue, fstrings (recorded to fstring_table)
  should not be ELTS_SHARED (should not have a shared string).



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43887 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-28 00:22:45 +00:00
glass 8c91dfb91b * st.c (st_keys): fix to use st_index_t for size of hash.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43886 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-27 16:36:44 +00:00
glass b426e1b1fa * st.c (st_keys): define st_keys(). it writes each key to buffer.
* hash.c (rb_hash_keys): use st_keys() for performance improvement
  if st_data_t and VALUE are compatible.

* st.h: define macro ST_DATA_COMPATIBLE_P() to predicate whether
  st_data_t and passed type are compatible.

* configure.in: check existence of builtin function to use in
  ST_DATA_COMPATIBLE_P().

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43885 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-27 16:07:10 +00:00
svn 884682755a * 2013-11-28
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43884 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-27 15:13:12 +00:00
glass 3ff90426d9 * ruby_atomic.h: remove duplicate definisions between ATOMIC_XXX
and ATOMIC_SIZE_XXX.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43883 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-27 15:13:08 +00:00
glass b983511292 * ruby_atomic.h: define ATOMIC_SIZE_CAS() with
__atomic_compare_exchange_n() and refactoring.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43882 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-27 14:57:33 +00:00
a_matsuda da66677061 * lib/irb/notifier.rb: [Doc] Fix typo
* ext/json/lib/json/common.rb:  Ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43881 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-27 12:56:08 +00:00
a_matsuda 0d72c6655c * lib/irb/notifier.rb: Fix typo
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43880 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-27 09:05:57 +00:00
ko1 9e733b9091 * gc.c (gc_mark_stacked_objects): check only when check_mode > 0.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43879 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-27 08:56:48 +00:00
tmm1 f8994603b3 * test/ruby/test_gc.rb (class TestGc): Fix warning in
test_expand_heap.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43878 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-27 07:07:59 +00:00
tmm1 0094b7bb68 * gc.c (Init_GC): Add new GC::INTERNAL_CONSTANTS for information about
GC heap/page/slot sizing.
* test/ruby/test_gc.rb (class TestGc): test for above.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43877 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-27 06:57:14 +00:00
tmm1 23178d1044 * gc.c (gc_page_sweep): Fix compile warning from last commit.
* hash.c (hash_aset_str): Re-use existing variable to avoid
  unnecessary pointer dereferencing.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43876 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-27 06:24:37 +00:00
ko1 da65a3d906 * gc.c (gc_page_sweep): disable debug print.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43875 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-27 06:13:19 +00:00
ko1 5993c141f1 * gc.c (gc_stat): add new information heap_eden_page_length and
heap_tomb_page_length.
* test/ruby/test_gc.rb: fix to use GC.stat[:heap_eden_page_length]
  instead of GC.stat[:heap_length].
  This test expects `heap_eden_page_length' (used pages size).



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43874 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-27 06:09:55 +00:00
tmm1 53f3ddfefb * test/ruby/test_eval.rb (class TestEval): Use assert_same instead of
assert_equal.
* test/ruby/test_hash.rb (class TestHash): ditto.
* test/ruby/test_iseq.rb (class TestISeq): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43873 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-27 06:03:37 +00:00
drbrain 9c8f03fac9 * lib/rinda/ring.rb: Announce RingServer for the same process.
[ruby-trunk - Bug #9163]
	* test/rinda/test_rinda.rb:  Tests for the above.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43872 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-27 05:50:21 +00:00
tmm1 fdcc476e21 * test/ruby/test_eval.rb (class TestEval): Add test for shared eval
filenames via rb_fstring().
* test/ruby/test_iseq.rb (class TestISeq): Add test for shared
  iseq labels via rb_fstring(). [Bug #9159]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43871 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-27 05:39:38 +00:00
tmm1 0c3b3e9237 * hash.c (hash_aset_str): Use rb_fstring() to de-duplicate hash string
keys. Patch by Eric Wong. [Bug #8998] [ruby-core:57727]
* test/ruby/test_hash.rb (class TestHash): test for above.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43870 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-27 05:28:55 +00:00
headius 26e969182b * test/ruby/test_string.rb: Add test for error when appending a
Symbol into a String.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43869 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-27 03:28:48 +00:00
tmm1 5080a75621 * gc.c: Rename rb_heap_t members:
used -> page_length
    limit -> total_slots

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43868 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-27 01:42:25 +00:00
nobu c38b4a9b3d test_bug_reporter.rb: remove core
* test/-ext-/bug_reporter/test_bug_reporter.rb (test_bug_reporter_add):
  remove expected core file to get rid of false error in chkbuild.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43867 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-27 00:32:37 +00:00
tmm1 cbb56e30a4 * compile.c: Use rb_fstring() to de-duplicate string literals in code. [ruby-core:58599] [Bug #9159] [ruby-core:54405]
* iseq.c (prepare_iseq_build): De-duplicate iseq labels and source locations.
* re.c (rb_reg_initialize): Use rb_fstring() for regex string.
* string.c (rb_fstring): Handle non-string and already-fstr arguments.
* vm_eval.c (eval_string_with_cref): De-duplicate eval source filename.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43866 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-26 23:30:25 +00:00
tenderlove 599c3a9245 * ext/psych/lib/psych.rb: psych version 2.0.2
* ext/psych/psych.gemspec: ditto

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43865 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-26 22:14:34 +00:00
tenderlove 079ff69ca0 * ext/psych/lib/psych/scalar_scanner.rb: fix support for negative
years.
* ext/psych/lib/psych/visitors/yaml_tree.rb: ditto
* test/psych/test_date_time.rb: test for change.
  Fixes: https://github.com/tenderlove/psych/issues/168

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43864 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-26 21:41:48 +00:00
tenderlove 725d6f4970 * ext/psych/lib/psych/scalar_scanner.rb: fix regexp for matching TIME
strings.
* test/psych/test_date_time.rb: test for change.
  Fixes: https://github.com/tenderlove/psych/issues/171

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43863 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-26 19:48:03 +00:00
nobu 4760b9824f string.c: fix memsize of frozen shared string
* string.c (str_new4): copy the original capacity so that memsize of
  frozen shared string returns correct size.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43862 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-26 17:27:01 +00:00
svn faaec02a2d * 2013-11-27
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43861 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-26 17:20:22 +00:00
nobu 94f01c55df should not ignore the rest of recursive constructs
* array.c (rb_ary_hash): should not ignore the rest of recursive
  constructs.
* hash.c (rb_hash_hash): ditto.
* range.c (range_hash): ditto.
* struct.c (rb_struct_hash): ditto.
* test/-ext-/test_recursion.rb (TestRecursion): separate from
  test/ruby/test_thread.rb.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43860 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-26 17:20:16 +00:00
nobu d503381ce8 hash.c: cut off if recursion
* hash.c (rb_hash): cut off if recursion detected to get rid of stack
  overflow.  [ruby-core:58567] [Bug #9151]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43859 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-26 13:43:40 +00:00
ko1 a4b0c3c26b * test/ruby/test_settracefunc.rb: add tests for a_call/a_return
by Brandur <brandur@mutelight.org> [Feature #9120]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43858 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-26 11:03:57 +00:00
ko1 be26a374e9 * common.mk: add useful config "set breakpoint pending on"
for run.gdb.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43857 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-26 10:30:42 +00:00