* thread.c (mutex_free): GC thread (main thread) has failed to unlock
a mutex that is locked by another thread, which makes the mutex
dangling in keeping_mutexes and causes [BUG] or stuck finally.
Now unlocking is performed as locking thread.
* thread.c (mutex_unlock, rb_mutex_unlock, rb_mutex_unlock_all):
mutex_unlock receives a thread.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@21132 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/dl/test/test_base.rb: use lib64 when the architecture is x86_64.
* ext/dl/test/test_base.rb: use libc.dylib when the platform is
darwin.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@21128 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32/win32.c (rb_w32_argv_size): if an argument is empty, it's size
is 2, not 0, because it will be converted to "".
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@21127 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* process.c (after_exec): needs to reset before restart timer
thread.
* thread.c (thread_start_func_2): stops timer thread if forked in
the new thread. [ruby-core:19385]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@21126 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* .gdbinit (dummy_gdb_enums.special_consts): forces to load debug
info on Mac OS X.
* .gdbinit (rp): added T_ZOMBIE.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@21124 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* eval.c (rb_frame_callee, rb_frame_caller): rb_frame_callee()
should return method id on current frame.
add rb_frame_caller() to get method id on parent frame.
Bug #884 [ruby-dev:37446]
* eval.c (rb_f_method_name): use rb_frame_caller()
instead of rb_frame_callee().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@21123 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* eval.c (get_errinfo): return th->errinfo value
if normal errinfo place (dynamic local viriable) is not found.
fixes Bug #732 [ruby-dev:37046].
* bootstraptest/test_proc.rb: add a test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@21116 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* vm_insnhelper.c (vm_call_method, vm_call_cfunc): use original id instead of
calling id when NODE_CFUNC or NODE_BMETHOD.
fixes Bug #632 [ruby-core:19282].
* vm_eval.c (vm_call0, vm_call_super): ditto.
* vm_method.c (rb_add_method, rb_alias): store original id
in nd_file field of NODE_METHOD.
* test/stringio/test_stringio.rb: add a test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@21113 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* vm.c (Init_VM): create and define TOPLEVEL_BINDING at first.
* vm.c (vm_set_main_stack, rb_iseq_eval_main): added.
* parse.y (rb_parser_compile_file): fix to check parse_in_eval flag.
* eval.c (ruby_exec_node): use rb_iseq_eval_main()
instead of rb_iseq_eval().
* iseq.c (rb_iseq_new_main), vm_core.h: added.
main script (specified by -e or script name) should be run
under TOPLEVEL_BINDING using Kernel#eval. Above changes
simulate Kernel#eval behaviour. [ruby-dev:37240]
* compile.c (make_name_for_block): skip iseq except block type.
this fix is needed for [ruby-dev:37240], and also fixes
[ruby-dev:35392].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@21083 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* process.c (after_fork): ignores a termination request in the
parent process. [ruby-dev:37447]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@21082 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/csv.rb: Using a more robust transcoding scheme to produce
ASCII compatible inspect() messages. [ruby-dev:37591]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@21081 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* pack.c (pack_pack): encoding of packed string only from 'm',
'M', and 'u' should be US-ASCII. [ruby-dev:37284]
* pack.c (pack_pack): encoding of packed string only from 'U'
should be UTF-8. also upgrade US-ASCII strings to UTF-8.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@21080 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* io.c (fptr_finalize): don't allocate objects if noraise.
(finish_writeconv): add noalloc argument to be able to avoid
object allocation.
(finish_writeconv_arg): introduced again.
(finish_writeconv_sync): follow the above change.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@21073 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* string.c (rb_external_str_new_with_enc): set ASCII-8BIT if
encoding is US-ASCII and string contains 8bit characters.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@21072 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y (gettable_gen): the encoding of __FILE__ should be
rb_filesystem_encoding(). [ruby-list:45733]
* parse.y (gettable_gen): __FILE__ should be ASCII-8BIT when
filesystem encoding is US-ASCII and __FILE__ contains non 7bit
characters.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@21071 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* io.c (fptr_finalize): close the IO object even if finish_writeconv or
flush is failed.
(finish_writeconv): don't raise. return errno or exception.
(finish_writeconv_arg): removed.
(finish_writeconv_sync): follow finish_writeconv change.
* transcode.c (rb_econv_make_exception): new function.
* include/ruby/encoding.h (rb_econv_make_exception): declared.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@21069 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* transcode.c (str_transcode0): set encoding when String#encode was
given explicit but the same destination and source encoding.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@21064 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/minitest/unit.rb (MiniTest::Assertions#assert_instance_of):
should assert by instance_of?, not ===. [ruby-dev:37458]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@21061 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* vm_insnhelper.c (check_cfunc): use function pointer.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@21055 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/ruby/test_process.rb: skip some tests on win32.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@21054 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/bigdecimal/bigdecimal.c (BigDecimal_div2): should return
Integer for #div operation.
* ext/bigdecimal/bigdecimal.c (BigDecimal_div2): should raise
ZeroDivisionError if divisor is zero. [ruby-dev:37207]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@21053 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/win32ole/win32ole.c (ole_event_free): invoke IConnectionPoint::Unadvise
before invoking IConnectionPoint::Release.
* test/win32ole/test_win32ole_event.rb, test/win32ole/err_in_callback.rb,
test/win32ole/test_err_in_callback.rb: Use ActiveX Data Object
Library instead of InternetExplorer.
--
* test/win32ole/test_err_in_callback.rb: add teardown.
--
* test/win32ole/test_win32ole_event.rb: rename test class.
* test/win32ole/test_win32ole_variant_outarg.rb: add in order
to use ADO instead of Internet Explorer.
remove test/win32ole/test_win32ole_variant_with_ie.rb.
* test/win32ole/orig_data.csv: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@21052 b2dd03c8-39d4-4d8f-98ff-823fe69b080e