passwd_iterate to close /etc/passwd on exception.
(group_ensure): move endgrent() call from group_iterate to close
/etc/group on exception.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35635 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
test_signal_requiring of test/ruby/test_signal.rb fail if the sub
process is killed on waiting IO in lex_io_gets in rb_load_file in
rb_load_internal in require.
This is because
(1) the process receive the killing signal in
rb_thread_io_blocking_region in rb_read_internal in lex_io_gets.
(2) set th->errinfo as INT2FIX(TAG_FATAL) at
rb_threadptr_execute_interrupts_common.
(3) escape rb_load_file in rb_load_internal and jump to EXEC_TAG()
without set loaded as TRUE.
(4) call first rb_exc_raise(GET_THREAD()->errinfo); because loaded
is FALSE as above. this errinfo should be an exception object
but this is INT2FIX(TAG_FATAL).
Don't call first rb_exc_raise if GET_THREAD()->errinfo is Fixnum.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35625 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
not Fixnum, but exception object.
This causes test_signal_requiring of test/ruby/test_signal.rb fail
if the sub process is killed on waiting IO in lex_io_gets in require
itself, not sleep.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35622 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y (primary): begin/end block should be isolated from outside.
[ruby-dev:45631][Bug #6419]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35620 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
must not cast it to unsigned long, which may be shorter than
VALUE, and the result can be mere garbage.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35619 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
RB_GC_GUARD() is only for variables on the machine stack, because it
forces a VALUE to be stored in a variable which should be referenced
from the GC, but does not add any reference path to the variable.
So it makes no sense for objects in heap.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35618 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/test/unit.rb (Test::Unit::Runner#failed): no unnecessary
newlines if no reports to be displayed.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35617 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
FreeBSD 9.0 with default setting (ipv6_activate_all_interfaces
is not YES) sets IFDISABLED to interfaces which don't have
global IPv6 address.
Link-local IPv6 addresses on those interfaces don't work.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35610 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y (lex_state_name): returns name for lex_state_e, for debug
use.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35607 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/mkmf.rb (MakeMakefile#pkg_config): check if libs resulted from
pkg-config works actually.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35605 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
To avoid buffer overflow when smaller FD_SETSISE is used in ext
libraries.
* win32/win32.c (rb_w32_fdset): this function is not used anymore.
But we leave this for compatibility.
* win32/win32.c (rb_w32_select_with_thread): fix SEGV when smaller
FD_SETSISE is used in ext libraries. Dereference of fd_set pointer
causes SEGV.
* test/-ext-/win32/test_fd_setsize.rb(TestFdSetSize): add tests for
above.
* ext/-test-/win32/fd_setsize/depend: ditto.
* ext/-test-/win32/fd_setsize/extconf.rb: ditto.
* ext/-test-/win32/fd_setsize/fd_setsize.c: ditto.
[ruby-core:44588] [Bug #6352]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35595 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
If the end of reading buffer is CR, io_unread() needs to unread one
more byte.
[ruby-core:44874] [Bug #6401]
* test/ruby/test_io_m17n.rb (TestIO_M17N#test_pos_with_buffer_end_cr):
add a test for above.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35594 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.in (POSTLINK): default to : command to get rid of flag
only command, since BSD make does not work with it.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35589 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/test/unit.rb (MiniTest#run_test): remove exact trace and get rid
of IndexError, which could caused by modified $@ sometimes.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35588 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
support drive letter on Windows. yes, the original code is metameta.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35587 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/test/unit.rb (Test::Unit::Runner#_prepare_run): keep the old
behavior if --verbose option is given.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35585 b2dd03c8-39d4-4d8f-98ff-823fe69b080e