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

28537 Коммитов

Автор SHA1 Сообщение Дата
naruse b1b7c389fb suppress warnings: uninitialized variables
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38092 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-30 19:10:14 +00:00
naruse 9207474f04 suppress warnings: unused variables
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38091 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-30 19:10:12 +00:00
naruse 8539a917dd Use RUBYOPT to overwrite original RUBYOPT ENV
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38090 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-30 19:10:05 +00:00
kosaki c62ec3ae1a * lib/sync.rb (Sync_m#sync_synchronize): add Thread.async_interrupt_timing
for protecting from async interrupt.
* lib/sync.rb (Sync_m#sync_lock): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38089 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-30 18:55:28 +00:00
kosaki 028ca79f98 * lib/thread.rb (ConditionVariable#broadcast): s/RuntimeError/StandardError/
* lib/thread.rb (ConditionVariable#signal): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38088 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-30 18:55:18 +00:00
kosaki 3357d88ada * lib/thread.rb (SizedQueue#pop): rewrite by using ConditionVariable.
* lib/thread.rb (SizedQueue#push): ditto.
* lib/thread.rb (SizedQueue#max): ditto.
* lib/thread.rb (Queue#pop): ditto.
* lib/thread.rb (Queue#push): ditto.

* lib/thread.rb (SizedQueue#num_waiting): adopt the above changes.
* lib/thread.rb (SizedQueue#initialize): ditto.
* lib/thread.rb (Queue#num_waiting): ditto.
* lib/thread.rb (Queue#initialize): ditto.
* test/thread/test_queue.rb (test_sized_queue_and_wakeup): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38087 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-30 18:55:09 +00:00
ko1 e742a446c8 * thread.c (Thread.async_interrupt_timing): fix RDoc.
:never is not used any more.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38086 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-30 18:47:00 +00:00
ko1 5697f69baa * iseq.c: add RubyVM::InstructionSequence (ISeq) inspection methods.
* ISeq#path returns path of this ISeq written.
* ISeq#absolute_path returns absolute path.
* ISeq#label returns label (method name and so on).
* ISeq#base_label returns base label (see Thread::Backtrace::Location).
* ISeq#first_lineno returns first line number of this ISeq.
* ISeq.of(obj) returns ISeq object which obj (Proc or Method)
  is contains.
* test/ruby/test_iseq.rb: add tests.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38085 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-30 18:02:43 +00:00
drbrain 57a83c4c9a * include/ruby/ruby.h (rb_event_flag_t): Maintain integer precision
for clang error (VALUE aka unsigned long vs unsigned int)


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38084 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-30 17:59:06 +00:00
drbrain 646eeab113 * test/rubygems/test_gem_dependency_installer.rb: Use Gem.read_binary
instead of File.binread for ruby 1.8 compatibility in the rubygems
  source repository.  Updates r38071


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38083 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-30 17:54:00 +00:00
kosaki a113ab64b2 * thread.c (rb_threadptr_interrupt_mask, async_interrupt_timing_func):
merge into them into rb_thread_s_async_interrupt_timing.
* thread.c (rb_thread_s_async_interrupt_timing): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38082 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-30 17:39:59 +00:00
kosaki 279cd29b1b * thread.c (rb_threadptr_interrupt_mask): add argument check.
* thread.c (async_interrupt_timing_arg_check_i): helper function
  for the above.
* test/ruby/test_thread.rb (test_async_interrupt_timing_invalid_argument):
  test for the above.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38081 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-30 17:39:48 +00:00
kosaki 6ca32179e6 * lib/thread.rb (ConditionVariable#broadcast): protect from
async interrupt by using Thread.async_interrupt_timing.
* lib/thread.rb (ConditionVariable#signal): ditto.
* lib/thread.rb (ConditionVariable#wait): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38080 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-30 17:39:36 +00:00
kazu a1d837ccc1 * test/ruby/envutil.rb (Test::Unit::Assertions#assert_in_out_err): raise if assert_in_out_err misused.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38079 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-30 17:14:27 +00:00
kazu 8f9b451dd8 assert_in_out_err with block ignores test_stdout
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38078 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-30 17:14:24 +00:00
usa ad01ea426c * test/rdoc/test_rdoc_rubygems_hook.rb
(TestRDocRubygemsHook#test_setup_unwritable): 1. check the existance
  of the file(directory) before touch it.  2. remove test
  file(directory) after the test.  see [ruby-core:50388].


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38077 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-30 17:11:11 +00:00
ko1 12f2f7371f [EXPERIMENTAL]
* iseq.c: add following two methods.
* ISeq#line_trace_all returns all line traces (line numbers)
* ISeq#line_trace_specify(pos, set) set `pos'th line event to
  specified_line event (if set is true).
  These features are introduced for debuggers (mainly to make
  breakpoint).
* iseq.h: add decl. of C APIs.
* test/ruby/test_iseq.rb: add tests.
* vm_trace.c: add `specified_line' event.
* include/ruby/ruby.h: ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38076 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-30 17:00:30 +00:00
usa 60317fa81d * test/rubygems/test_gem_dependency_installler.rb: gems are of course
binary files, so use a binary reading method when reading it.
  see [ruby-core:50388].


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38075 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-30 16:51:11 +00:00
usa 952beb5ff4 * lib/rubygems/command.rb (Gem::Command#get_all_gem_names_and_versions):
who assumes that the pathname of a gem never contains ':' ?
  yes, on Unixen pathnames can contain ':', and on Windows they almost
  certainly contain ':'.  see [ruby-core:50388].

* lib/rubygems/requirement.rb (Gem::Requirement::PATTERN_RAW): extract
  the regexp to match the version specifier from PATTERN to use in
  above method.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38074 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-30 16:27:52 +00:00
ngoto 4bb1bfa0ed * ext/fiddle/extconf.rb, ext/fiddle/function.c
(Fiddle::Function::STDCALL): FFI_STDCALL is not a macro, but an enumeration. [ruby-core:50398] [Bug #7483]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38073 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-30 15:57:21 +00:00
kazu 7c1a19b641 fix typos
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38072 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-30 15:16:03 +00:00
usa a847bedb1d * test/rubygems/test_gem_installer.rb
(TestGemInstaller#test_check_executable_overwrite_other_non_gem):
  on Windows, rubygems always generate a wrapper .bat file when
  installing a file into bin, so testing no-overwrite a wrapper file
  and a non-wrapper file is nonsence.  see [ruby-core:50388].


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38071 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-30 15:11:30 +00:00
nagachika b688029ae8 * ChangeLog: remove duplicated lines for r38042-r38044.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38070 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-30 15:07:30 +00:00
svn ed13a84ace * 2012-12-01
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38069 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-30 15:05:19 +00:00
nagachika b20e7eb954 * ChangeLog: fix a typo for r38064.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38068 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-30 15:05:18 +00:00
nagachika f125ec9ac5 * ChangeLog: fix a typo for r38063.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38067 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-30 15:05:15 +00:00
usa ec7d935ce7 * test/rubygems/test_gem_installer.rb
(TestGemInstaller#test_check_executable_overwrite_default_bin_dir):
  if the executable to be overwritten was generated by rubygems, the
  error messsage differs from the only copied one's.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38066 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-30 14:43:10 +00:00
usa 053ca25f2d * test/rubygems/test_gem_ext_ext_conf_builder.rb
(TestGemExtExtConfBuilder::test_class_make): reading with binary mode
  of course introduce \r on Windows.  see [ruby-core:50388].


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38065 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-30 14:29:03 +00:00
usa bcef71590c * lib/rubygems/specification.rb
(Gem::Specification.validate_permissions): don't check executablity
  of the source on Windows.  they will be wrapped to .bat files when
  installing.  see [ruby-core:50388].


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38064 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-30 14:15:35 +00:00
kosaki 15b25acd25 * vm_core.h (rb_vm_struct): add thread_destruct_lock field.
* thread.c (Init_Thread): ditto.
* thread.c (rb_vm_gvl_destroy): ditto.

* thread.c (thread_start_func_2): make sure vm->running_thread
  don't point to dead thread.
* thread.c (timer_thread_function): close a race against thead
  destruction. [Bug #4911][ruby-dev:43859]

* vm_core.h (rb_thread_set_current): reset running time of
  current thread instead of previous thread. We no longer
  assume previous running thread still live.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38063 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-30 13:52:34 +00:00
kosaki 2e72d1c323 revert r35486 (add rb_thread_t#yeiling field). because it doesn't help
to close a race.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38062 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-30 13:52:24 +00:00
usa 5d33dad16c * revert r38053 because it causes too many test failures.
if you've already installed r38053 or later, remove the installed
  lib/ruby/gems/2.0.0 directory and reinstall this revision or later.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38061 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-30 13:00:23 +00:00
kazu 759619ca86 fix typos
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38060 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-30 12:50:05 +00:00
usa d07346a102 * lib/test/unit/parallel.rb (Test::Unit::Worker.run): wrap LoadError
because it's Gem::LoadError sometimes.  see [Bug #6882]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38059 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-30 12:09:19 +00:00
ko1 bb4410a289 * thread.c: TracePoint#self returns invoking/exitting thread object
at thread_begin/end event.
* test/ruby/test_settracefunc.rb: fix test.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38058 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-30 11:50:26 +00:00
usa d0a4fecffc * test/ruby/memory_status.rb (Memory::Win32): sorry, ko1.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38057 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-30 11:22:49 +00:00
usa 88201504ae * test/ruby/memory_status.rb (Memory::Win32): rescue non libffi user, such as ko1.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38056 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-30 11:15:36 +00:00
usa 7ca1927af1 * ChangeLog: mention to ML and ticket: [ruby-core:50194] [Bug #7443]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38055 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-30 10:59:38 +00:00
usa 77df72a64a * test/ruby/memory_status.rb (Memory::Win32): use fiddle instead of dl,
but I doubt fiddle is not compatible with dl. (if you are interested,
  see the diff.)


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38054 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-30 10:57:06 +00:00
kou f807e1b80d * defs/default_gems: Add base directory column.
* tool/rbinstall.rb:
  - Install .gemspecs of default gem to
    #{GEM_HOME}/specifications/default/.
  - Update files parameter of .gemspecs by relative path from
    library directory.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38053 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-30 10:45:58 +00:00
zzak 57540a4932 * vm_trace.c:
tracepoint_attr_return_value (TracePoint#return_value):
    include `:b_return` for method doc
  tracepoint_enable_m, tracepoint_disable_m (#enable/#disable):
    don't have block argument, document block scope


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38052 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-30 10:29:49 +00:00
zzak 5a82fca5f9 fix typos
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38051 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-30 10:08:02 +00:00
ko1 6df1b3a9de * vm_trace.c (tracepoint_disable_m, tracepoint_enable_m):
fix block parameter.
  No arugment should be given to a block which is passed
  to TracePoint#enable (and disable).



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38050 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-30 09:55:32 +00:00
nobu fcd4ecd576 vm_backtrace.c: suppress warning
* vm_backtrace.c (rb_debug_inspector_open): suppress
  uninitialized-variable warning.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38049 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-30 09:50:34 +00:00
nobu ed0aa14fcc zlib.c: suppress warning
* ext/zlib/zlib.c (zstream_run): suppress unused-but-set-variable
  warning.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38048 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-30 09:50:32 +00:00
nobu 578deb65b0 zlib.c: suppress warning
* ext/zlib/zlib.c (zlib_mem_alloc): suppress unused-value warning.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38047 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-30 09:50:30 +00:00
ko1 719e0cd530 * thread.c: rename Thread.control_interrupt
to Thread.async_interrupt_timing.
  The option name `:never' is also changed to  `:defer'.
  [ruby-core:50375] [ruby-trunk - Feature #6762]
* thread.c: remove Thread.check_interrupt.
  This method is difficult to understand by name.
* thraed.c: add Thread.async_interrupted?.
  This method check any defered async interrupts.
* test/ruby/test_thread.rb: change tests for above.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38046 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-30 09:28:35 +00:00
zzak f2fee84466 * vm_trace.c: Documentation for TracePoint API
[ruby-core:47243] [Feature #6895]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38045 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-30 09:25:24 +00:00
nobu 020cc0ad5c string.c: compare with to_str
* string.c (rb_str_cmp_m): try to compare with to_str result if
  possible before calling <=> method.  [ruby-core:49279] [Bug #7342]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38044 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-30 08:43:52 +00:00
nobu c08785a362 string.c: use rb_check_funcall
* string.c (rb_str_cmp_m): use rb_check_funcall instead of respond_to
  and call.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38043 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-30 08:43:47 +00:00