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

24671 Коммитов

Автор SHA1 Сообщение Дата
nobu 3723ac22d2 * ext/io/console/console.c (console_cooked, console_set_cooked):
new methods to reset cooked mode.  [EXPERIMENTAL]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33785 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-18 07:12:14 +00:00
usa 7491541e16 * test/unit/assertions.rb (MINI_DIR): quick dirty hack to get rid of
warnings when using assert/assert_respond_to.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-18 04:21:23 +00:00
usa 44cff77b95 * io.c (rb_cloexec_open): set O_NOINHERIT instead of O_CLOEXEC if it is
available (for Windows).

* win32/win32.c (fcntl): on F_DUPFD, determine the inheritance of the
  new handle by O_NOINHERIT flag of original fd.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33783 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-18 04:06:01 +00:00
ryan d6c86e631d Imported minitest 2.8.1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33782 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-17 23:02:16 +00:00
svn 6b43a55611 * 2011-11-18
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33781 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-17 22:38:21 +00:00
ryan 5a94b29c53 Improved error message when using llvm-gcc
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33780 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-17 22:38:18 +00:00
akr 09d2180d2d * ext/dbm/extconf.rb: revert a part of the patch in [ruby-dev:41531].
don't use db.h with other headers.  [ruby-dev:44884].



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33779 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-17 11:45:32 +00:00
usa b37c003e24 * benchmark/bm_io_select[23].rb: use Process::RLIMIT_NOFILE only when
it is defined.  if it is not defined, assume 64 as the max of fds.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33778 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-17 11:24:07 +00:00
tenderlove b5907f7d46 infinite loop seems to be fixed, so I can uncomment this assertion.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33777 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-17 01:42:54 +00:00
svn 9660bcfc43 * 2011-11-17
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33776 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-17 01:38:20 +00:00
tenderlove 07636686da * ext/psych/lib/psych.rb (load_file): make sure opened yaml files are
also closed. [ruby-core:41088]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33775 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-17 01:38:16 +00:00
nobu 1f86c08fdf * Makefile.in (LIBRUBY_A): check if generated linked library is
valid for extconf.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33774 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-16 09:13:56 +00:00
usa 4a997526e0 * bignum.c (rb_big2ulong): need to calc in unsigned long, because
the range of VALUE is larger than it on LLP64 platform, such as Win64.
  this change fixes the failures of test/-ext-/num2int.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33773 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-16 04:53:51 +00:00
usa 2a44594508 * test/webrick/test_cgi.rb (TestWEBrickCGI#start_cgi_server): there are
no guarantee of existance of RbConfig::CONFIG['LIBPATHENV'].
  it only exists in Unix-like environments.

* test/webrick/test_filehandler.rb
  (WEBrick::TestFileHandler#test_script_disclosure): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33772 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-16 03:06:05 +00:00
naruse ff187b0267 Refix r33766.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33771 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-16 02:43:03 +00:00
usa bbe004c1e4 * io.c (argf_next_argv): wrong timing of setting ecflags.
fixed the failure of TestArgf#test_textmode introduced at r33662.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33770 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-16 02:36:08 +00:00
naruse b4664c781b Fix r33766.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33769 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-16 02:12:37 +00:00
usa ce03ef0242 * ext/-test-/num2int/num2int.c: remove an unnecessary and wrong decl
of rb_stdout.  it's declared in ruby.h correctly.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33768 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-16 01:46:43 +00:00
usa 5db50ed02d * bignum.c (rb_big2ull): add a cast to get rid of a VC++ warning.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33767 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-16 01:27:15 +00:00
naruse 12bde2dfab * lib/minitest/unit.rb (assert_raises): experimental fix to run
correctly on chkbuild over 64bit linux. call exception_details only
  when the detail is really needed to avoid create needless inspect
  under ulimit-ed environment.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33766 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-16 00:59:56 +00:00
svn efdcaeaf32 * 2011-11-16
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33765 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-15 21:35:14 +00:00
akr 737907b24a * test/ruby/test_thread.rb (test_condvar_timed_wait): use
assert_operator.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33764 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-15 21:35:09 +00:00
nobu dbb03fdc96 * ext/openssl/ossl_asn1.c: get rid of potential overflow.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33763 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-15 13:55:38 +00:00
akr 498a6e8a05 * test/ruby/test_sleep.rb (test_sleep_5sec): 0.1sec tolerance is too
small for busy environment.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33762 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-15 12:58:37 +00:00
akr 3d25acdccc * io.c, thread.c, ext/pty/pty.c, ext/fiddle/closure.c: use
__linux__ macro for consistency.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33761 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-15 11:09:47 +00:00
nobu e4081877a8 * sparc.c: property.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33760 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-15 07:04:08 +00:00
kosaki fd5a7ee75c * include/ruby/ruby.h(NUM2LONG, NUM2INT, NUM2SHORT, NUM2LL,
INT2NUM, UINT2NUM, LONG2NUM, ULONG2NUM, NUM2CHR): wrap by
  macros.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33759 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-15 05:57:34 +00:00
ngoto 3d85b0ff5a * fix ANSI C compliance of r33757
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33758 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-15 05:05:35 +00:00
ngoto fa00b6516c * include/ruby/defines.h (FLUSH_REGISTER_WINDOWS): move sparc asm code
to a separete file sparc.c for preventing inlining optimization.
  Patched by Jurij Smakov. [Bug #5244] [ruby-core:40685]
* sparc.c (rb_sparc_flush_register_windows): ditto.
* configure.in: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33757 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-15 04:42:31 +00:00
kosaki 9cdd62bd19 * include/ruby/ruby.h: get rid of gcc specific rb_long2int(),
NUM2LONG(), NUM2INT(), NUM2SHORT(), NUM2LL(), INT2NUM(),
  UINT2NUM(), LONG2NUM(), ULONG2NUM() and NUM2CHR()
  implementation. Because 1) They don't make any better code
  at all. 2) Inline function have a better debugger supoort.
  3) If they become to make better code in the future, they
  might make cross compiler ABI compatibility issue.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33756 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-15 04:18:43 +00:00
kosaki d020fb1525 * test/ruby/test_io.rb (TestIO#test_fcntl_dupfd): fix OpenBSD test
failure. [ruby-dev:44872]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33755 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-15 01:41:58 +00:00
naruse 16b663db57 * regcomp.c (print_indent_tree): fix double printing of ENCLOSE_OPTION
children bug. patched by Suraj Kurapati. [ruby-core:40964]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33754 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-15 00:51:46 +00:00
ayumin 66f8e8bbce revert r33752 and fix test case based [ruby-dev:44866].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33753 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-14 17:02:10 +00:00
ayumin 40ca7a2265 * test/ruby/test_io.rb (test_fcntl_dupfd): fix test error on
SnowLeopard.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33752 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-14 16:10:17 +00:00
svn e1440769f3 * 2011-11-15
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33751 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-14 16:00:33 +00:00
kosaki 61fe9d5c41 added a description of NUM2SHORT() to NEWS
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33750 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-14 16:00:29 +00:00
akr b848d4f9c8 * ext/openssl/ossl_pkey.c (ossl_pkey_new_from_file): set close-on-exec
flag.

* ext/openssl/ossl_x509cert.c (rb_fd_fix_cloexec): ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33749 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-14 13:06:51 +00:00
akr 158a828c97 add comment.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33748 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-14 11:22:15 +00:00
nobu 958caf186f * ext/-test-/num2int/num2int.c: should return valid values.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33747 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-14 08:17:49 +00:00
kosaki ed681d3a82 * bignum.c (rb_big2ull): fix 32bit platform breakage. we must
not assume sizeof(VALUE) == sizeof(LONG_LONG).
* test/-ext-/num2int/test_num2int.rb (class TestNum2int):
  fix false assumption on 32bit platform.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33746 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-14 05:56:09 +00:00
kosaki 302220a8a5 * numeric.c (rb_fix2ushort): fix typo. use num rb_num2ushort()
instead of num2uint().



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33745 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-14 05:53:59 +00:00
kosaki 9debadd948 * include/ruby/ruby.h: add #ifdef comment.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33744 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-14 03:55:40 +00:00
kosaki b2a2ba1191 * include/ruby/ruby.h: add NUM2SHORT(), NUM2USHORT() macros.
* numeric.c: ditto.

* test/-ext-/num2int/test_num2int.rb: add testcases for NUM2SHORT().
* ext/-test-/num2int/num2int.c: ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33743 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-14 03:54:34 +00:00
kosaki d3437b7c1a * bignum.c (rb_big2ull): fix off-by-twice bug of NUM2ULL.
* test/-ext-/num2int/test_num2int.rb (class TestNum2int):
  fix a testcase too.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33742 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-14 03:51:56 +00:00
kosaki 11137bed53 * test/-ext-/num2int/test_num2int.rb (class TestNum2int):
add FIXNUM tests.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33741 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-14 03:47:21 +00:00
svn 15102dacfc * 2011-11-14
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33740 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-14 03:45:54 +00:00
kosaki 74a13c7634 * numeric.c (check_uint): fix off-by-one bug of NUM2UINT.
* bignum.c (rb_big2ulong): fix off-by-one bug of NUM2ULONG.

* test/-ext-/num2int/test_num2int.rb: add a testcase for NUM2INT()
  NUM2UINT(), NUM2LONG(), NUM2ULONG(), NUM2LL and NUM2ULL().
* ext/-test-/num2int/depend: ditto.
* ext/-test-/num2int/extconf.rb: ditto.
* ext/-test-/num2int/num2int.c: ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33739 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-14 03:45:47 +00:00
nobu 416778c5d8 * ext/dbm/extconf.rb: use convertible_int.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33738 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-13 14:47:31 +00:00
nobu a0146d1e87 * lib/mkmf.rb (checking_for): should not modify the result.
* lib/mkmf.rb (have_struct_member): accept compiler opttions.
* lib/mkmf.rb (convertible_int): add restricted support of struct
  member, and TYPEOF_ macro.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33737 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-13 14:46:01 +00:00
akr 4b01d611db * ext/gdbm/gdbm.c (fgdbm_reorganize): set close-on-exec flag after
gdbm_reorganize().  gdbm_reorganize() opens a new database internally.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33736 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-13 14:22:17 +00:00