aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* ripper: dispatch new parser event 'kwrest_param' on f_kwresttopic/ripper-unnamed-kwrestKazuki Yamaguchi2016-05-163-1/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ripper has an issue in handling bare kwrest: $ ruby -rpp -rripper -e'pp Ripper.sexp("def a(**) end")' [:program, [[:def, [:@ident, "a", [1, 4]], [:paren, [:params, nil, nil, nil, nil, nil, 183, nil]], [:bodystmt, [[:void_stmt]], nil, nil, nil]]]] The mysterious 183 is the problem: this is an ID generated by internal_id(). This patch introduces a new 'kwrest_param' parser event that works just like 'rest_param' event that corresponds to rest params (def a(*rest) end). After applying this, the result will be: $ ruby -rpp -rripper -e'pp Ripper.sexp("def a(**name) end")' [:program, [[:def, [:@ident, "a", [1, 4]], [:paren, [:params, nil, nil, nil, nil, nil, [:kwrest_param, [:@ident, "name", [1, 8]]], nil]], [:bodystmt, [[:void_stmt]], nil, nil, nil]]]] $ ruby -rpp -rripper -e'pp Ripper.sexp("def a(**) end")' [:program, [[:def, [:@ident, "a", [1, 4]], [:paren, [:params, nil, nil, nil, nil, nil, [:kwrest_param, nil], nil]], [:bodystmt, [[:void_stmt]], nil, nil, nil]]]] * parse.y (f_kwrest): dispatch kwrest_param event, just like rest_param. * test/ripper/dummyparser.rb (on_kwrest_param): add kwrest_param parser event handler. * test/ripper/test_parser_events.rb (test_params): adjust. * test/ripper/test_parser_events.rb (test_kwrest_param): test that kwrest_param event handler is properly called.
* don't use keeper thread. [Bug #12342]seki2016-05-153-66/+50
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55008 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * array.c (rb_ary_entry): extract rb_ary_elt to organize if-conditionsnaruse2016-05-152-2/+14
| | | | | | and check whether is is embdeded at once. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55007 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* random.c: suppress a warningnobu2016-05-151-1/+5
| | | | | | | * random.c (random_ulong_limited): suppress a shift count warning when unsigned long is 32bits. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55006 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* vm_insnhelper.c: deprecated constant in classnobu2016-05-154-9/+24
| | | | | | | * vm_insnhelper.c (vm_get_ev_const): warn deprecated constant even in the class context. [ruby-core:75505] [Bug #12382] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55005 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* random.c: clear seednobu2016-05-141-0/+1
| | | | | | * random.c (rand_init): clear packed seed value explicitly. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55004 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2016-05-15svn2016-05-141-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55003 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * iseq.h (struct iseq_compile_data): use struct rb_id_tablenaruse2016-05-144-8/+32
| | | | | | | | | | | | | | | instead of st_table. * iseq.c (prepare_iseq_build): don't allocate ivar_cache_table until it has at least one element. * iseq.c (compile_data_free): free ivar_cache_table only if it is allocated. * compile.c (get_ivar_ic_value): allocate if the table is not allocated yet. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55002 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ChangeLog: GitHub referencenobu2016-05-141-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55000 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/mkmf.rb: use xsystem to pkg-config --existsnobu2016-05-142-1/+7
| | | | | | | | * lib/mkmf.rb (pkg_config): use xsystem consistently to set up library path environment variable as well as latter pkg-config calls. [ruby-dev:49619] [Bug #12379] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54999 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_rand.rb: tests for seedsnobu2016-05-131-0/+14
| | | | | | | * test/ruby/test_rand.rb: tests for Random.raw_seed and Random.new_seed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54998 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* random.c: no local copy of the seednobu2016-05-132-15/+12
| | | | | | | * random.c (make_seed_value): append leading-zero-guard and get rid of making a local copy of the seed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54997 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2016-05-14svn2016-05-131-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54996 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* random.c: fill_random_seed sizenobu2016-05-131-6/+7
| | | | | | * random.c (fill_random_seed): move the seed size to an argument. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54995 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* random.c: clear bufnobu2016-05-131-1/+4
| | | | | | * random.c (random_seed): clear temporary buffer explicitly. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54994 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix typos [ci skip]kazu2016-05-131-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54993 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* drop FreeBSD < 4 supportnobu2016-05-123-8/+11
| | | | | | | | | | * NEWS: drop FreeBSD < 4 support. The most recent version affected by this is 3.5 and was released in 2000. https://www.freebsd.org/releases/3.5R/announce.html https://en.wikipedia.org/wiki/History_of_FreeBSD#Version_history git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54992 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* extmk.rb: failures formatnobu2016-05-121-2/+11
| | | | | | | * ext/extmk.rb: show extension failures in compilation-mode friendly format. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54991 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* defines.h: avoid redefinitionnobu2016-05-121-0/+2
| | | | | | | * include/ruby/defines.h (GCC_VERSION_SINCE): get rid of re-definition. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54990 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix typo in r54988naruse2016-05-121-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54989 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* include/ruby/defines.h (GCC_VERSION_SINCE): moved from internal.hnaruse2016-05-125-23/+27
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54988 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2016-05-13svn2016-05-121-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54987 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Use HAVE_BUILTIN___BUILTIN_CONSTANT_Pnaruse2016-05-126-8/+15
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54986 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * configurein: use alternative keywordnaruse2016-05-123-19/+26
| | | | | | to avoid macros conflicts with them. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54985 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix a typo [ci skip]kazu2016-05-121-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54984 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* extmk.rb: failed messages at the endnobu2016-05-121-9/+17
| | | | | | | | * 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
* mkmf.rb: fix conflict in have_librarynobu2016-05-112-5/+13
| | | | | | | * 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
* win32: qsort_snobu2016-05-111-1/+1
| | | | | | * 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
* * win32/Makefile.sub (HAVE_QSORT_S): use qsort_s only for Visual Studiousa2016-05-112-1/+7
| | | | | | | | 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
* fix typo at ChangeLogtarui2016-05-111-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54979 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2016-05-12svn2016-05-111-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54978 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_insnhelper.c (vm_getivar): describe fast-path explicittarui2016-05-112-22/+23
| | | | | | | (compiler frindly). [Bug #12274]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54977 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * compile.c (iseq_compile_each): share InlineCache during sametarui2016-05-114-3/+35
| | | | | | | | | | | | | | | 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
* test_minitest_unit.rb: fix "random" sortnobu2016-05-111-7/+3
| | | | | | | * 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
* util.c: qsort_snobu2016-05-114-0/+14
| | | | | | | * 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
* fix file name [ci skip]nobu2016-05-111-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54973 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2016-05-11svn2016-05-111-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54972 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ChangeLog: Remove trailing-whitespaces.hsbt2016-05-112-2/+7
| | | | | | [ci skip][fix GH-1348] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54971 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * insns.def (defineclass): Also raise an error when redeclaring theeregon2016-05-103-5/+31
| | | | | | | | 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
* random.c: reuse bitsnobu2016-05-101-2/+14
| | | | | | | * 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
* random.c: use bytesnobu2016-05-105-29/+92
| | | | | | | * 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
* * configure.in (-fexcess-precision=standard): before r54895 -std=c99naruse2016-05-102-1/+8
| | | | | | | | 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-10svn2016-05-091-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54966 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* random.c: compare by rb_equalnobu2016-05-091-2/+1
| | | | | | * 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
* fix a typo [ci skip]kazu2016-05-091-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54964 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* random.c: consitifynobu2016-05-091-1/+1
| | | | | | * 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
* random.c: seed conversionnobu2016-05-091-3/+2
| | | | | | | | | | * 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
* thread.c: GET_THREAD once in rb_thread_atforknobu2016-05-092-5/+12
| | | | | | | * 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
* thread.c: clear atfork functionsnobu2016-05-094-7/+30
| | | | | | | | | | | | * 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
* openssl/extconf.rb: NO SSL macros firstnobu2016-05-091-8/+10
| | | | | | | * 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