kosaki
989c529c89
* thread.c (thread_start_func_2): remove unused code. When
...
th->safe_level == 4, th->errinfo never be thrown. So, to
create new exception makes no sense.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37963 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-29 02:09:36 +00:00
ko1
f22f1fbb54
* vm_backtrace.c: same as a last patch.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37962 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-29 01:30:42 +00:00
ko1
d7ab6820b5
* vm_backtrace.c: use `long' for return values of `NUM2LONG()'.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37961 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-29 01:26:38 +00:00
naruse
d1dfebc05a
Revert r37953: thread.c (thread_start_func_2): remove unused code. security
...
This sticks at bootstraptest/test_fork.rb:24 on FreeBSD and darwin.
http://fb.rubyci.org/~chkbuild/ruby-trunk/log/20121128T230302Z.log.html.gz
http://a.mrkn.jp/~mrkn/chkbuild/sl/ruby-trunk-m64-gcc42-o0/log/20121128T235908Z.log.html.gz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37960 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-29 01:11:47 +00:00
naruse
e2779a53ef
* thread.c (do_select): suppress warning (uninitialized value warning)
...
with UNINITIALIZED_VAR().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37959 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-29 00:52:51 +00:00
ko1
98ed344ae9
* eval.c (ruby_cleanup): delay THREAD_KILLED timing.
...
It should be located just before rb_thread_terminate_all().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37958 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-29 00:48:16 +00:00
ko1
3d47e7b285
* vm_backtrace.c (vm_backtrace_to_ary): support range argument
...
like Array#[].
[ruby-core:50092] [ruby-trunk - Feature #7434 ]
Test and document is not available. Please help us.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37957 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-29 00:12:49 +00:00
kosaki
b76b6b5c98
* thread.c (thread_start_func_2): small cleanups.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37956 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-28 21:55:26 +00:00
kosaki
5e606aee2f
* thread.c (thread_start_func_2): remove unused code.
...
this function never be used for main thread.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37955 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-28 21:55:14 +00:00
kosaki
fdda95ed8c
* thread.c (thread_start_func_2): remove unused code.
...
errinfo = th->errinfo; and errinfo = rb_errinfo(); are
the same.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37954 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-28 21:55:03 +00:00
kosaki
1d207fcff0
* thread.c (thread_start_func_2): remove unused code. security
...
level is checked before rb_eSecurityError raises.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37953 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-28 21:54:52 +00:00
ko1
2fa079b62a
* vm_backtrace.c (backtrace_to_str_ary2): rename to backtrace_to_str_ary.
...
* vm_backtrace.c (rb_backtrace_to_str_ary): use `backtrace_to_str_ary()'.
* vm_backtrace.c (backtrace_to_frame_ary): rename to
backtrace_to_location_ary.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37952 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-28 20:30:01 +00:00
tenderlove
4bdd909518
* probes.d: Change function-entry probe to method-entry.
...
* insns.def: ditto
* probes_helper.h: ditto
* test/dtrace/test_function_entry.rb: ditto
* test/dtrace/test_singleton_function.rb: ditto
* vm.c: ditto
* vm_eval.c: ditto
* vm_insnhelper.c: ditto
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37951 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-28 20:20:50 +00:00
ko1
0fe2051c93
* vm_backtrace.c: rename Class name from
...
::RubyVM::Backtrace and ::RubyVM::Backtrace::Location
to ::Thread::Backtrace and ::Thread::Backtrace::Location.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37950 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-28 19:46:44 +00:00
nagachika
c5c1d8c236
* ChangeLog: fix a typo for r37928.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37949 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-28 18:09:34 +00:00
svn
c788b5f52b
* 2012-11-29
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37948 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-28 17:56:50 +00:00
nagachika
af6decf85e
* ChangeLog: fix a typo for r37938.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37947 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-28 17:56:39 +00:00
nagachika
7b6e26ae14
* ext/fiddle/closure.c: cosmetic fix for rdoc comment. (fix for r37917)
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37946 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-28 14:55:41 +00:00
tarui
5c32aff16e
revert some part of r37942. sorry.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37945 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-28 14:53:47 +00:00
ko1
36b21ada61
add ticket ref: [ruby-dev:46654] [ruby-trunk - Bug #7455 ]
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37944 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-28 14:41:13 +00:00
ko1
09f9aa4385
* thread.c (rb_mutex_sleep): fix to allow spurious wakeup.
...
* NEWS: write about spurious wakeup.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37943 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-28 14:40:00 +00:00
tarui
e59c7307da
* NEWS (Thread) remove incompatible changes.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37942 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-28 14:37:47 +00:00
ko1
bf442ed2b3
* thread_win32.c: catch up latest change of BLOCKING_REGION.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37941 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-28 13:57:52 +00:00
ko1
ff2ca81bb3
* vm_insnhelper.c (vm_call_method): fix undefined behavior.
...
Should not access scope local variable from outer scope.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37940 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-28 13:56:29 +00:00
tarui
c6557c6fab
* test/ruby/test_thread.rb (test_thread_status_in_trap): change test for
...
thread status in trap. now can accept Thread#join and Thread#value in trap.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37939 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-28 13:24:36 +00:00
ko1
9d0de48e66
* include/ruby/thread.h (rb_thread_call_without_gvl2): change
...
meaning of function.
This function is called with same parameters of
`rb_thread_call_without_gvl()'.
However, if interrupts are detected, when return immediately.
* thread.c: implement `rb_thread_call_without_gvl2()'.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37938 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-28 13:01:25 +00:00
tarui
f5dc27aa77
* thread.c (thread_join_sleep): check spurious wakeup by itself for
...
corresponding status change in trap context.
* vm_core.h (struct rb_thread_struct): add rb_thread_list_t and use as join_list for
reentry by trap context.
* thread.c (thread_start_func_2): ditto.
* thread.c (remove_from_join_list): ditto.
* thread.c (rb_thread_atfork): ditto.
* thread.c (thread_join): ditto. & remove trap handler check.
* thread.c (sleep_forever): add argument : spurious_check.
* thread.c (sleep_timeval): ditto.
* thread.c (rb_thread_sleep_forever): set spurious_check.
* thread.c (rb_thread_sleep_deadly): ditto.
* thread.c (sleep_for_polling): ditto.
* thread.c (rb_thread_wait_for): ditto.
* thread.c (sleep_wait_for_interrupt): bypass spurious_check.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37937 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-28 12:34:15 +00:00
nobu
ac93d931fa
emitter.c: constify
...
* ext/psych/yaml/emitter.c (yaml_emitter_write_indicator): constify.
* ext/psych/yaml/emitter.c (yaml_emitter_write_block_scalar_hints):
ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37936 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-28 12:23:20 +00:00
nobu
082a2716cc
extconf.rb: mingw32
...
* ext/psych/extconf.rb: mingw32 also needs macros for win32, not
only mswin32.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37935 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-28 12:22:47 +00:00
nobu
d8da0faf23
extconf.rb: VPATH
...
* ext/psych/extconf.rb: compile sources in the source directory
without copying by using VPATH.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37934 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-28 12:21:19 +00:00
nobu
a0f7f36a5a
mkmf.rb: each_compile_rules
...
* lib/mkmf.rb (MakeMakefile#each_compile_rules): splat $(*VPATH*) for
each VPATH elements.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37933 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-28 12:19:49 +00:00
nobu
3baef1fc22
unit.rb: remove unnecessary includes
...
* lib/test/unit.rb (Test::Unit::{GlobOption,LoadPathOption}): remove
unnecessary includes.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37932 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-28 12:17:30 +00:00
kosaki
9cbf473287
* vm_core.h (enum rb_thread_status): remove THREAD_TO_KILL
...
* vm_core.h (struct rb_thread_struct): add to_kill field
* thread.c (terminate_i): convert THREAD_TO_KILL to to_kill.
* thread.c (rb_threadptr_to_kill): ditto.
* thread.c (rb_thread_kill): ditto.
* thread.c (rb_thread_wakeup_alive): ditto.
* thread.c (thread_list_i): ditto.
* thread.c (static const char): ditto.
* thread.c (thread_status_name): ditto.
* thread.c (rb_thread_status): ditto.
* thread.c (rb_thread_inspect): ditto.
* vm_backtrace.c (thread_backtrace_to_ary): ditto.
* thread.c (rb_threadptr_execute_interrupts): fix thread status
overwritten issue. [Bug #7450 ] [ruby-core:50249]
* test/ruby/test_thread.rb (test_hread_status_raise_after_kill):
test for the above.
* test/ruby/test_thread.rb (test_thread_status_in_trap): test for
thread status in trap.
* test/ruby/test_thread.rb (test_status_and_stop_p): remove
Thread.control_interrupt unsafe test. Thread#kill no longer
changes thread status. Instead of, Thread#kill receiver changes
their own status when receiving kill signal.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37931 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-28 08:31:03 +00:00
kosaki
b8a1e36201
* thread.c (struct rb_mutex_struct): add allow_trap field.
...
* internal.h (rb_mutex_allow_trap): added.
* thread.c (rb_mutex_lock, rb_mutex_unlock): check mutex->allow_trap.
* thread.c (mutex_sleep): remove trap check because it uses
rb_mutex_lock and rb_mutex_unlock internally.
* thread.c (rb_mutex_allow_trap): new helper function for the above.
* io.c (io_binwrite): mark fptr->write_lock as writable in trap.
* test/ruby/test_signal.rb (test_trap_puts): test for the above.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37930 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-28 08:30:51 +00:00
ko1
fc57f2bfdb
add ticket number [Bug #4559 ]
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37929 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-28 08:01:43 +00:00
ko1
49ed2a756b
* proc.c: remove Proc#== and Proc#eql?.
...
Proc objects compared with thier object ids.
* test/ruby/test_proc.rb: remove related test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37928 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-28 08:00:53 +00:00
drbrain
45011d08e1
* lib/rdoc/servlet.rb: Add support for serving documentation from a
...
subdirectory.
* lib/rdoc/generator/darkfish.rb: ditto
* test/rdoc/test_rdoc_servlet.rb: Test for above
* test/rdoc/test_rdoc_servlet.rb: ditto
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37927 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-28 07:41:19 +00:00
naruse
013521e557
* configure.in: fix r37294: run only on i[3-6]86-linux.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37926 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-28 06:45:25 +00:00
kosaki
e6ef313a49
* io.c (FMODE_SYNCWRITE): removed unused macro.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37925 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-28 06:36:28 +00:00
ngoto
58b8573081
* configure.in: revert r37911, r37906 and r37904 which break build
...
with non-gcc and/or non-IA32 compilers, e.g. Solaris Studio,
Fujitsu C Compiler. [ruby-dev:46646] [Bug #7451 ]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37924 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-28 06:29:05 +00:00
ko1
1ff0a3d0c6
* ext/psych/extconf.rb: copy sources into build directory,
...
not into srcdir.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37923 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-28 05:52:11 +00:00
kosaki
835d24f637
* thread.c (rb_mutex_lock): moved trap context check from
...
rb_mutex_trylock because try_lock have no change to make
a deadlock.
* thread.c (rb_mutex_trylock): ditto.
* NEWS: news for the above.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37922 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-28 05:40:54 +00:00
kosaki
8111b32d68
* thread.c (thread_s_new): uses main_thread->status instead of
...
th->inhibit_thread_creation for preventing thread creation.
* vm_core.h (rb_vm_struct): remove inhibit_thread_creation field.
* thread.c (rb_thread_terminate_all): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37921 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-28 04:43:15 +00:00
nobu
d5c463b576
* properties.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37920 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-28 04:35:40 +00:00
tenderlove
14099149f4
* ext/psych/extconf.rb: use embedded libyaml if no system libyaml is
...
found. [ruby-core:49463]
* ext/psych/lib/psych.rb: updating to psych 2.0.0
* ext/psych/lib/psych/deprecated.rb: updated docs
* ext/psych/psych.gemspec: updated to psych 2.0.0
* ext/psych/psych.h: fixing header file include for rename
* ext/psych/psych_emitter.c: renamed to avoid libyaml conflict.
* ext/psych/psych_emitter.h: ditto
* ext/psych/psych_parser.c: ditto
* ext/psych/psych_parser.h: ditto
* ext/psych/psych_to_ruby.c: ditto
* ext/psych/psych_to_ruby.h: ditto
* ext/psych/psych_yaml_tree.c: ditto
* ext/psych/psych_yaml_tree.h: ditto
* ext/psych/yaml/LICENSE: embedding libyaml 0.1.4
* ext/psych/yaml/api.c: ditto
* ext/psych/yaml/config.h: ditto
* ext/psych/yaml/dumper.c: ditto
* ext/psych/yaml/emitter.c: ditto
* ext/psych/yaml/loader.c: ditto
* ext/psych/yaml/parser.c: ditto
* ext/psych/yaml/reader.c: ditto
* ext/psych/yaml/scanner.c: ditto
* ext/psych/yaml/writer.c: ditto
* ext/psych/yaml/yaml.h: ditto
* ext/psych/yaml/yaml_private.h: ditto
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37919 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-28 04:34:41 +00:00
kosaki
694c77633c
* thread.c (thread_join): A trap handler check was moved from
...
thread_join_m because Thread#value should be raised an exception
too.
* thread.c (thread_join_m): remove trap handler check.
* test/ruby/test_thread.rb (test_thread_join_in_trap): add test
for thread#value.
* NEWS: documentation fix for the above.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37918 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-28 04:09:38 +00:00
zzak
4ed6a88b74
* ext/fiddle/closure.c: Documentation for Fiddle
...
* ext/fiddle/lib/fiddle/import.rb: ditto
* ext/fiddle/lib/fiddle/value.rb: ditto
* ext/fiddle/lib/fiddle/pack.rb: ditto
* ext/fiddle/lib/fiddle/cparser.rb: ditto
* ext/fiddle/lib/fiddle/struct.rb: ditto
* ext/fiddle/lib/fiddle/function.rb: ditto
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37917 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-28 02:08:39 +00:00
ryan
0700a9113f
Added #charpos for multibyte string position.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37916 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-28 00:17:33 +00:00
nobu
db9fe59b73
* properties.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37915 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-28 00:03:05 +00:00
tenderlove
0713f89944
* ext/fiddle/fiddle.c: adding alignment constants for compatibility
...
with DL.
* ext/fiddle/fiddle.h: ditto
* ext/fiddle/lib/fiddle/cparser.rb: importing the C parser for DL
backwards compatibility.
* ext/fiddle/lib/fiddle/import.rb: importing the import DSL for DL
backwards compatibility.
* ext/fiddle/lib/fiddle/pack.rb: importing structure pack for DL
backwards compatibility.
* ext/fiddle/lib/fiddle/value.rb: ditto
* ext/fiddle/lib/fiddle/struct.rb: importing struct DSL for DL backwards
compatibility.
* test/dl/test_c_struct_entry.rb: importing tests
* test/dl/test_c_union_entity.rb: ditto
* test/dl/test_cparser.rb: ditto
* test/dl/test_import.rb: ditto
* test/fiddle/test_c_struct_entry.rb: ditto
* test/fiddle/test_c_union_entity.rb: ditto
* test/fiddle/test_cparser.rb: ditto
* test/fiddle/test_import.rb: ditto
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37914 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-28 00:02:49 +00:00