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

33266 Коммитов

Автор SHA1 Сообщение Дата
knu 9f01bdae2a Record dependency on Emacs 24.3 and update commentary.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43477 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-31 04:13:43 +00:00
kazu 63fef3d741 fix typos
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43476 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-30 12:04:11 +00:00
knu 6ca6820a56 misc/ruby-additional.el: Remove functions implemented in Emacs 24.3.
* misc/ruby-additional.el (ruby-brace-to-do-end)
  (ruby-do-end-to-brace, ruby-toggle-block): Remove functions that
  are already in the latest released version of Emacs (24.3).
  [Bug #7565]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43475 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-30 10:11:20 +00:00
nobu bfea5bc277 Makefile.sub: add missing config variables
* win32/Makefile.sub (config.status): add missing variables,
  PLATFORM_DIR and THREAD_MODEL.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43474 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-30 03:44:30 +00:00
akr caa3c88040 * time.c (v2w): Normalize a rational value to an integer if possible.
[ruby-core:58070] [Bug #9059] reported by Isaac Schwabacher.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43473 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-30 03:22:23 +00:00
glass adcab6c1bb * array.c (rb_ary_uniq_bang): use rb_ary_modify_check() instead of
rb_ary_modify() because the array will be unshared soon.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43472 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-30 03:11:41 +00:00
tenderlove 06c6dcee25 * ext/psych/lib/psych/visitors/yaml_tree.rb: make less garbage when
testing if a string is binary.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43471 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-29 18:25:57 +00:00
svn 64d97719ff * 2013-10-30
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43470 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-29 18:10:31 +00:00
tenderlove e0c6dd91a4 * ext/psych/lib/psych/visitors/yaml_tree.rb: string subclasses should
not be considered to be binary.  Fixes Psych / GH 166
  https://github.com/tenderlove/psych/issues/166

* test/psych/test_string.rb: test for fix

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43469 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-29 18:10:24 +00:00
glass 887ff70f23 * array.c (rb_ary_zip): some refactoring.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43468 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-29 14:08:48 +00:00
glass 806b93ed9b * array.c (rb_ary_uniq_bang): use st_foreach() instead of for loop.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43467 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-29 13:14:19 +00:00
ko1 c5e08b764e * add RUBY_TYPED_FREE_IMMEDIATELY to data types which only use
safe functions during garbage collection such as xfree().
  On default, T_DATA objects are freed at same points as fianlizers.
  This approach protects issues such as reported by [ruby-dev:35578].
  However, freeing T_DATA objects immediately helps heap usage.
  Most of T_DATA (in other words, most of dfree functions) are safe.
  However, we turned off RUBY_TYPED_FREE_IMMEDIATELY by default
  for safety.
* cont.c: ditto.
* dir.c: ditto.
* encoding.c: ditto.
* enumerator.c: ditto.
* error.c: ditto.
* file.c: ditto.
* gc.c: ditto.
* io.c: ditto.
* iseq.c: ditto.
* marshal.c: ditto.
* parse.y: ditto.
* proc.c: ditto.
* process.c: ditto.
* random.c: ditto.
* thread.c: ditto.
* time.c: ditto.
* transcode.c: ditto.
* variable.c: ditto.
* vm.c: ditto.
* vm_backtrace.c: ditto.
* vm_trace.c: ditto.
* ext/bigdecimal/bigdecimal.c: ditto.
* ext/objspace/objspace.c: ditto.
* ext/stringio/stringio.c: ditto.
* ext/strscan/strscan.c: ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43466 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-29 11:16:54 +00:00
ko1 0c6940b718 * include/ruby/ruby.h: fix typo (FL_WB_PROTECT -> FL_WB_PROTECTED).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43465 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-29 10:49:45 +00:00
ko1 5c1b9b38d6 * vm_trace.c (tp_free): remvoed because empty free function.
Use RUBY_TYPED_NEVER_FREE instead.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43464 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-29 09:47:06 +00:00
ko1 52811ab159 * include/ruby/ruby.h: introduce new flags for T_TYPEDDATA.
* RUBY_TYPED_FREE_IMMEDIATELY: free the data given by DATA_PTR()
    with dfree function immediately.  Otherwise (default), the data
    freed at finalizaton point.
  * RUBY_TYPED_WB_PROTECTED: make this object with FL_WB_PROTECT
    (not shady).
* gc.c (obj_free): support RUBY_TYPED_FREE_IMMEDIATELY.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43463 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-29 09:42:45 +00:00
ko1 5aa527fade * gc.c (vm_malloc_increase): decrease it more carefully.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43462 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-29 07:49:43 +00:00
ko1 97f0de6d90 * gc.c (heap_page_resurrect): return a page in tomb heap even if
freelist is NULL.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43461 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-29 07:25:45 +00:00
nobu 1058f20672 ruby_atomic.h: ATOMIC_SIZE_CAS
* ruby_atomic.h (ATOMIC_SIZE_CAS): new macro, compare and swap size_t.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43460 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-29 06:46:33 +00:00
kazu 52d8f9f3ef fix typos
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43459 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-29 05:31:57 +00:00
akr a69756de67 * ext/readline/readline.c (readline_getc): Consider
NULL as input.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43458 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-29 03:09:00 +00:00
tmm1 29dbed183e * gc.c (gc_profile_total_time): fix off-by-one error in GC::Profiler.total_time.
* test/ruby/test_gc.rb (class TestGc): test for above.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43457 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-29 02:11:26 +00:00
svn fb3bd5a18a * 2013-10-29
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43456 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-29 00:52:44 +00:00
charliesome 7fafa8f376 * insns.def, vm.c, vm_insnhelper.c, vm_insnhelper.h, vm_method.c: split
ruby_vm_global_state_version into two separate counters - one for the
  global method state and one for the global constant state. This means
  changes to constants do not affect method caches, and changes to
  methods do not affect constant caches. In particular, this means
  inclusions of modules containing constants no longer globally
  invalidate the method cache.

* class.c, eval.c, include/ruby/intern.h, insns.def, vm.c, vm_method.c:
  rename rb_clear_cache_by_class to rb_clear_method_cache_by_class

* class.c, include/ruby/intern.h, variable.c, vm_method.c: add
  rb_clear_constant_cache

* compile.c, vm_core.h, vm_insnhelper.c: rename vmstat field in
  rb_call_info_struct to method_state

* vm_method.c: rename vmstat field in struct cache_entry to method_state

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43455 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-29 00:52:38 +00:00
akr e2ec76056a * test/readline/test_readline.rb (teardown): Clear Readline.input and
Readline.output.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43454 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-28 14:26:41 +00:00
nobu 73ef296c77 * properties.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43453 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-28 12:38:16 +00:00
akr d3e84880ad * ext/-test-/file/depend, ext/-test-/postponed_job/depend,
ext/-test-/tracepoint/depend: New files for dependencies.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43452 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-28 12:36:23 +00:00
nobu 8f675f0b89 openssl: work around of dependency
* ext/openssl/depend (ossl.o): work around of dependency of
  thread_native.h, which depends on headers by THREAD_MODEL.
  [ruby-dev:47777]
* ext/openssl/extconf.rb: need THREAD_MODEL.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43451 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-28 06:32:24 +00:00
nobu 106ce21e91 * goruby.c (init_golf): append suffix.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43450 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-28 06:32:22 +00:00
nobu 06969b6bce load.c: share feature names
* load.c (ruby_init_ext): share feature names between frame name and
  provided features.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43449 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-28 05:57:04 +00:00
knu 3701549796 * misc/ruby-electric.el: Import ruby-electric.el 2.1 from
https://github.com/knu/ruby-electric.el.

  * Hitting the newline-and-indent key within a comment fires
    comment-indent-new-line.

  * Introduce a new feature
    `ruby-electric-autoindent-on-closing-char`.

  * Fix fallback behavior of ruby-electric-space/return that
    caused error with auto-complete.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43448 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-28 05:45:23 +00:00
nobu 6cb24cee64 error.c: remove NameError#to_s
* error.c (name_err_to_s): remove no longer needed overriding, since
  r30455 which made exc_to_s almost same.  Fixes [GH-413].

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43447 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-28 04:17:20 +00:00
nobu 4a21c8cc27 test_exception.rb: missing test
* test/ruby/test_exception.rb (test_to_s): missing test for r30455.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43446 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-28 04:11:20 +00:00
akr 674f14a0bc * common.mk, ext/objspace/depend, ext/coverage/depend,
ext/-test-/debug/depend, ext/date/depend: Update dependencies.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43445 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-28 03:43:17 +00:00
charliesome 393e577d31 * vm.c: vm_clear_all_cache is not necessary now we use a 64 bit counter
for global state version.

* vm_insnhelper.h: ruby_vm_global_state_version overflow is unnecessary

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43444 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-28 00:31:07 +00:00
tmm1 910cee22e9 * vm_backtrace.c (rb_profile_frame_classpath): do not use rb_inspect
directly, since it might have a custom implementation or show ivars.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43443 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-27 22:48:34 +00:00
tmm1 5b529e5a3d * vm_backtrace.c (rb_profile_frame_classpath): handle singleton
methods defined directly on an object.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43442 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-27 19:17:24 +00:00
svn be16693f94 * 2013-10-28
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43441 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-27 15:52:44 +00:00
nobu ab453f901d struct.c: fix warning message
* struct.c (new_struct): fix warning message, class name and encoding.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43440 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-27 15:52:39 +00:00
akr d5dad14041 * ext/readline/readline.c: Include ruby/thread.h for
rb_thread_call_without_gvl2.
  (readline_rl_instream, readline_rl_outstream): Record FILE
  structures allocated by this extension.
  (getc_body): New function extracted from readline_getc.
  (getc_func): New function.
  (readline_getc): Use rb_thread_call_without_gvl2 to invoke getc_func.
  [ruby-dev:47033] [Bug #8749]
  (clear_rl_instream, clear_rl_outstream): Close FILE structure
  allocated by this extention reliably.  [ruby-core:57951] [Bug #9040]
  (readline_readline): Use clear_rl_instream and clear_rl_outstream.
  (readline_s_set_input): Set readline_rl_instream.
  (readline_s_set_output): Set readline_rl_outstream.
  (Init_readline): Don't call readline_s_set_input because
  readline_getc doesn't block other threads for any FILE structure now.

  [ruby-dev:47033] [Bug #8749] reported by Nobuhiro IMAI.
  [ruby-core:57951] [Bug #9040] reporeted by Eamonn Webster.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43439 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-27 12:04:14 +00:00
nobu d956453a98 process.c: Process::Tms
* process.c (Init_process): rename Struct::Tms as Process::Tms.  keep
  the former defined for the backward compatibility, for the time
  being.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43438 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-27 01:38:20 +00:00
svn 0139a6f0e6 * 2013-10-27
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43437 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-27 01:36:22 +00:00
nobu f8978ba3f9 envutil.rb: fix disabling gems in assert_separately
* test/ruby/envutil.rb (assert_separately): fix the position of
  --disable=gems option.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43436 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-27 01:36:18 +00:00
ktsj ad367a256e * gc.c: catch up recent changes to compile on GC_DEBUG,
RGENGC_CHECK_MODE.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43434 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-26 10:42:07 +00:00
nobu 64f2b9f990 range.c: modify check
* range.c (range_initialize_copy): disallow to modify after
  initialized.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43433 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-26 10:08:02 +00:00
nobu 2c6518c37d envutil.rb: disable gems in child process
* test/ruby/envutil.rb (assert_separately): disable gems by default to
  get rid of loading test-unit gem, which doesn't have _assertions
  method.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43432 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-26 10:07:13 +00:00
nobu 78d0fdcec9 signal.c: adjust indent
* signal.c (ruby_atomic_compare_and_swap): adjust indent.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43431 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-26 10:07:11 +00:00
akr 11efba7e56 * lib/open-uri.rb (meta_add_field): : Re-implemented.
[ruby-core:58017] [Bug #9051] patch by Eamonn Webster.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43430 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-26 08:49:58 +00:00
ko1 b848aad5bf * gc.c (gc_profile_dump_on): use "Page" terminology.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43428 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-26 05:35:43 +00:00
ko1 d03912898e * gc.c (gc_sweep, gc_heap_lazy_sweep): fix measurement code.
We only need one sweep time measurement without lazy sweep.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43427 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-26 04:31:10 +00:00
akr fdf7b4586f * addr2line.c: Include ELF header after system headers (especially
sys/types.h) to avoid compilation failure,
  "usr/include/sh3/elf_machdep.h:4:2: error: #error Define _BYTE_ORDER!",
  on NetBSD/sh3 (dreamcast, hpcsh, landisk, mmeye).



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43426 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-26 03:04:27 +00:00