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

33639 Коммитов

Автор SHA1 Сообщение Дата
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
ko1 8ca8d7afb3 * ext/objspace/object_tracing.c (newobj_i): skip class_path if class
is frozen.
  rb_class_path() can modify frozen classes (and causes errors).
  This patch is temporary. We need no-modification/no-allocation
  class path function.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43856 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-26 10:26:41 +00:00
ko1 bd26be2b34 * vm_trace.c: skip "exception check" and "reentrant check (only normal
events)  for internal events.
  Reentrant check for internal events are remaining.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43855 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-26 09:42:04 +00:00
ko1 5b40cb6a2c * vm_trace.c: prohibit to specify normal events and internal events
simultaneously.
  I will introduce special care for internal events later.
* ext/-test-/tracepoint/tracepoint.c: test this behavior.
* test/-ext-/tracepoint/test_tracepoint.rb: ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43854 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-26 08:41:44 +00:00
nobu 079009fb93 file.c: fix buffer overflow
* file.c (rb_readlink): fix buffer overflow on a long symlink. since
  rb_str_modify_expand() expands from its length but not its capacity,
  need to set the length properly for each expansion.
  [ruby-core:58592] [Bug #9157]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43853 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-26 07:30:37 +00:00
tmm1 adcd0174b9 * ext/objspace/objspace_dump.c (dump_append_string_value): Escape
control characters for strict json parsers.
* ext/objspace/objspace_dump.c (objspace_dump): Document File/IO
  output option.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43852 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-26 05:27:22 +00:00
glass 0791c940ad * ruby_atomic.h: use __atomic builtin functions supported by GCC.
__sync family are legacy functions now and it is recommended
  that new code use the __atomic functions.
  http://gcc.gnu.org/onlinedocs/gcc/_005f_005fatomic-Builtins.html

* configure.in: check existence of __atomic functions.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43851 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-26 02:45:53 +00:00
nobu 6295a023a5 * properties: ext/bigdecimal/bigdecimal.gemspec
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43850 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-26 02:23:13 +00:00
nobu d473aff645 * properties: ext/bigdecimal/bigdecimal.gemspec
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43849 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-26 02:20:10 +00:00
nobu 78acdaca3c bigdecimal.gemspec: date
* ext/bigdecimal/bigdecimal.gemspec: revert Gem::Specification#date
  for snapshot/release tarballs.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43848 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-26 01:57:55 +00:00
tmm1 302743d3e7 * NEWS: Add ObjectSpace.after_gc_{start,end}_hook=
* ext/objspace/objspace_dump.c: [DOC] catch up dump/dump_all to r43679

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43847 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-25 21:46:00 +00:00
svn c21f62d0f8 * 2013-11-26
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43846 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-25 19:14:57 +00:00
drbrain 04817ae6d3 * lib/rubygems: Update to RubyGems master 612f85a. Notable changes:
Fixed installation and activation of git: and path: gems via
  Gem.use_gemdeps

  Improved documentation coverage

* test/rubygems:  ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43845 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-25 19:14:49 +00:00
zzak c107372597 * lib/xmlrpc.rb: [DOC] Fix link to xmlrpc4r site [Bug #9148]
Patch by Giorgos Tsiftsis


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43844 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-25 13:23:53 +00:00
zzak 217d37a64a * lib/uri/common.rb: [DOC] typo fixes by @vipulnsward [Fixes GH-456]
https://github.com/ruby/ruby/pull/456
* lib/uri/generic.rb: [DOC] ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43843 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-25 10:49:29 +00:00
zzak b514742374 * ext/bigdecimal/bigdecimal.gemspec: bump BigDecimal to 1.2.3 for
proper release date in RubyGems


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43842 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-25 05:35:18 +00:00
zzak a7925537d4 * ext/bigdecimal/bigdecimal.gemspec: Remove Gem::Specification#date
We should rely on rubygems to create the date the gem was released
  for each version.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43841 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-25 05:25:53 +00:00
kazu 336eb217e6 fix typos
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43840 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-25 04:22:32 +00:00
ko1 2bfd722d80 * internal.h: do not use ruby_sized_xrealloc() and ruby_sized_xfree()
if HAVE_MALLOC_USABLE_SIZE (or _WIN32) is defined.
  We don't need these function if malloc_usable_size() is available.
* gc.c: catch up this change.
* gc.c: define HAVE_MALLOC_USABLE_SIZE on _WIN32.
* array.c (ary_resize_capa): do not use ruby_sized_xfree() with
  local variable to avoid "unused local variable" warning.
  This change only has few impact.
* string.c (rb_str_resize): ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43839 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-25 01:13:31 +00:00
ko1 84b7d6d533 * test/-ext-/tracepoint/test_tracepoint.rb: catch up GC.stat changes
at r43835.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43838 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-24 20:06:02 +00:00
ko1 30e88ca8a7 * gc.c: continue to change OLDSPACE -> OLDMALLOC.
RGENGC_ESTIMATE_OLDSPACE -> RGENGC_ESTIMATE_OLDMALLOC.
* gc.c: add a new major GC reason GPR_FLAG_MAJOR_BY_OLDMALLOC.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43837 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-24 19:49:02 +00:00
ko1 a87eaf88a0 * gc.c: change terminlogy "..._num" to "..._slots" about slot opetaion.
* final_num -> final_slots
  * objspace_live_num() -> objspace_live_slots()
  * objspace_limit_num() -> objspace_limit_slots()
  * objspace_free_num() -> objspace_free_slots()



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43836 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-24 19:18:53 +00:00