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

43307 Коммитов

Автор SHA1 Сообщение Дата
naruse 91e3c8b370 * configurein: use alternative keyword
to avoid macros conflicts with them.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54985 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-12 18:12:45 +00:00
kazu b69cc4ccbd fix a typo [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54984 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-12 13:01:03 +00:00
nobu 2b7c721499 extmk.rb: failed messages at the end
* ext/extmk.rb: output failed configurations at the end, not to be
  scrolled out.
  TODO: show the message at the end of the whole build.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54983 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-12 11:19:43 +00:00
nobu 6ff3a8e3bb mkmf.rb: fix conflict in have_library
* lib/mkmf.rb (try_func): get rid of conflict of declarations of
  main().  checking local symbol reference does not make sense.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54982 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-11 16:54:10 +00:00
nobu d6d8ea91e9 win32: qsort_s
* win32/Makefile.sub (HAVE_QSORT_S): disable on VS2012 too.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54981 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-11 16:39:24 +00:00
usa 98c084b8ba * win32/Makefile.sub (HAVE_QSORT_S): use qsort_s only for Visual Studio
2012 or later, because VS2010 seems to causes a SEGV in
  test/ruby/test_enum.rb.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54980 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-11 15:21:49 +00:00
tarui cb459dbe64 fix typo at ChangeLog
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54979 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-11 15:08:27 +00:00
svn 313f9694b8 * 2016-05-12
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54978 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-11 15:04:28 +00:00
tarui 0b8f8ac54e * vm_insnhelper.c (vm_getivar): describe fast-path explicit
(compiler frindly). [Bug #12274].


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54977 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-11 15:04:27 +00:00
tarui 44916ec448 * compile.c (iseq_compile_each): share InlineCache during same
instance variable accesses. Reducing memory consumption,
	  rasing cache hit rate and rasing branch prediction hit rate
	  are expected. A part of [Bug #12274].

	* iseq.h (struct iseq_compile_data): introduce instance
	  variable IC table for sharing.

	* iseq.c (prepare_iseq_build, compile_data_free):
	  construct/destruct above table.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54976 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-11 12:50:38 +00:00
nobu ac8c23f1b5 test_minitest_unit.rb: fix "random" sort
* test/minitest/test_minitest_unit.rb (test_test_methods_random):
  hack to fix the order by avoiding duplicate keys.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54975 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-11 12:24:16 +00:00
nobu be4b1c1e2c util.c: qsort_s
* util.c (ruby_qsort): use qsort_s if available, for Microsoft
  Visual Studio 2005 (msvcr80.dll) and mingw.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54974 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-11 08:18:56 +00:00
nobu d22cf0de18 fix file name [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54973 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-11 07:13:35 +00:00
svn a3d2c119c1 * 2016-05-11
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54972 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-11 01:33:31 +00:00
hsbt 4e3a98d383 * ChangeLog: Remove trailing-whitespaces.
[ci skip][fix GH-1348]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54971 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-11 01:33:30 +00:00
eregon 06dd20f7fe * insns.def (defineclass): Also raise an error when redeclaring the
superclass of a class as Object and it has another superclass.
  [Bug #12367] [ruby-core:75446]
* test/ruby/test_class.rb: test for above.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54970 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-10 12:46:43 +00:00
nobu 15fbd05e4e random.c: reuse bits
* random.c (random_ulong_limited): reduce calling bytes methods by
  reusing dropped bits.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54969 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-10 06:46:09 +00:00
nobu b402cc7161 random.c: use bytes
* random.c (obj_random_bytes): base on bytes method instead of
  rand method, not to call toplevel rand method.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54968 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-10 05:57:11 +00:00
naruse 518713fd65 * configure.in (-fexcess-precision=standard): before r54895 -std=c99
is specified and it implied -fexcess-precision=standard.
  Now with -std=gnu99, it should be explicitly specified.
  https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54967 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-10 04:36:33 +00:00
svn fbf22f2da1 * 2016-05-10
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54966 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-09 16:25:54 +00:00
nobu a6b221f238 random.c: compare by rb_equal
* random.c (random_equal): compare seeds by rb_equal.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54965 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-09 16:25:53 +00:00
kazu bc7a845a80 fix a typo [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54964 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-09 14:30:00 +00:00
nobu 8610bd032a random.c: consitify
* random.c (init_by_array): consitify initializing keys.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54963 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-09 04:27:12 +00:00
nobu ad949e8f31 random.c: seed conversion
* random.c (rand_init): random_seed() always returns an Integer,
  no conversion for it.

* random.c (random_init, rb_f_srand): convert the given seed to an
  Integer.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54962 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-09 03:52:09 +00:00
nobu 639bfd6d9c thread.c: GET_THREAD once in rb_thread_atfork
* thread.c (rb_thread_atfork_internal): move th to an argument.
* thread.c (rb_thread_atfork): do not repeat GET_THREAD().

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54961 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-09 01:52:01 +00:00
nobu a46df859cc thread.c: clear atfork functions
* thread.c (rb_thread_atfork, rb_thread_atfork_before_exec): do
  nothing unless working fork is available.
* thread_sync.c (rb_mutex_abandon_all): define only if working
  fork is available.
* thread_sync.c (rb_mutex_abandon_keeping_mutexes): ditto.
* thread_sync.c (rb_mutex_abandon_locking_mutex): ditto.
* thread_win32.c (gvl_init): never used.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54960 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-09 01:46:37 +00:00
nobu e6709f0a62 openssl/extconf.rb: NO SSL macros first
* ext/openssl/extconf.rb: check OPENSSL_NO_SSL{2,3} macros before
  checking related functions.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54959 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-09 00:05:33 +00:00
nobu abfc0b18d5 webrick/utils.rb: suppress messages
* test/webrick/utils.rb (TestWEBrick#start_server): suppress
  progress messages from WEBrick::Utils#create_self_signed_cert.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54958 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-09 00:05:32 +00:00
nobu 4a46404a71 test_ssl_server.rb: assert_self_signed_cert
* test/webrick/test_ssl_server.rb (assert_self_signed_cert):
  extract common assertion.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54957 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-09 00:05:30 +00:00
usa 2cb362b51f * include/ruby/{defines,ruby}.h: need to define function attributes
alternatives in defines.h instead of ruby.h, because they are used
  in oniguruma.h and the header used without including ruby.h at
  encoding library sources.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54956 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-08 22:20:05 +00:00
usa a8e1070d9d * include/ruby/ruby.h (CONSTFUNC, PUREFUNC): fixed build errors on
non-gcc build environments introduced at r54952.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54955 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-08 21:31:23 +00:00
naruse b3935f179b * gc.c (rb_gc_unprotect_logging): throw rb_memerror when it cannot
allocate memory. This is pointed out by Facebook's Infer.

* gc.c (gc_prof_setup_new_record): ditto.

* regparse.c (parse_regexp): ditto.

* util.c (MALLOC): use xmalloc and xfree like above.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54954 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-08 17:52:38 +00:00
svn 6db71fb11a * 2016-05-09
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54953 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-08 17:44:52 +00:00
naruse 28f5e12c24 * configure.in: check function attirbute const and pure,
and define CONSTFUNC and PUREFUNC if available.
  Note that I don't add those options as default because
  it still shows many false-positive (it seems not to consider
  longjmp).

* vm_eval.c (stack_check): get rb_thread_t* as an argument
  to avoid duplicate call of GET_THREAD().

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54952 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-08 17:44:51 +00:00
kazu 94419c16dc fix typos [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54951 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-08 14:36:18 +00:00
naruse 93767f7a86 * ext/openssl/extconf.rb: asume it doesn't have SSLv2 related
functions when OPENSSL_NO_SSL2 is defined.
  Usually openssl's header and the library (libssl) have the same
  set of functions, but on some environment the library has functions
  whose headers doesn't declare. (openssl/opensslconf.h and libsso.so
  aren't be synchronized)
  To detect such case explicitly check feature macro and remove
  related functions.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54950 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-08 12:10:22 +00:00
nobu 6cd2c9057a win32ole_error.h: add attributes
* ext/win32ole/win32ole_error.h (ole_raise): add attributes,
  NORETURN and PRINTF_ARGS.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54949 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-08 09:59:37 +00:00
nobu d7d64d9147 objspace_dump.c: fix format
* ext/objspace/objspace_dump.c (dump_append_string_content),
  (dump_object): fix the format specifiers.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54948 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-08 09:59:36 +00:00
nobu f0355ae707 file.c: home dir fall back
* file.c (rb_home_dir_of): return the default home path if the
  user name is the current user name, on platforms where struct
  pwd is not supported.  a temporary measure against
  [Bug #12226].

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54947 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-08 09:51:34 +00:00
nobu 65bbd0884c intern.h: suppress warnings
* include/ruby/intern.h (rb_disable_super, rb_enable_super):
  remove NORETURN.  these do nothing but just return.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54946 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-08 03:21:28 +00:00
naruse f2535e1467 * configure.in: add -Wsuggest-attribute=format and suppress warnings.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54945 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-08 00:55:29 +00:00
svn 4e0e72195d * 2016-05-08
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54944 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-08 00:55:28 +00:00
naruse a6c8e8d15b * configure.in: add -Wsuggest-attribute=noreturn and suppress warnings.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54943 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-08 00:55:28 +00:00
naruse 644c36e9a6 * configure.in: add -Werror=implicit-int to avoid missing type of
function declaration.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54942 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-08 00:55:28 +00:00
hsbt a6e805f75e * lib/webrick/ssl.rb: Accept string value for SSLCertName. It is used
to invoke ssl server with command line.
  [fix GH-1329] Patch by @kerlin
* test/webrick/test_ssl_server.rb: Added test for GH-1329

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54941 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-07 13:37:18 +00:00
svn d8e22fa1dd * properties.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54940 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-07 12:55:18 +00:00
hsbt b39d4eac28 * test/webrick/test_ssl_server.rb: Added basic test for `webrick/ssl`
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54939 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-07 12:55:17 +00:00
nobu ed5b985650 random.c: optimize int_pair_to_real_inclusive
* random.c (int_pair_to_real_inclusive): optimize to multiply
  without Bignum.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54938 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-07 07:22:14 +00:00
nobu 091d88ab4b random.c: split random_int32
* random.c (random_int32): split the cases of rb_random_t and
  other objects.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54937 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-07 06:21:00 +00:00
nobu 1a696e35c8 random.c: unnecessary declarations
* random.c (random_ulong_limited, random_ulong_limited_big):
  remove unnecessary extern declarations.  rb_num_negative_p is
  declared in internal.h now.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54936 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-07 02:59:32 +00:00