summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-03-19vm_args.c: arity check of lambdanobu
* vm_eval.c (rb_yield_lambda): new function which yields an array to a proc and splat to a lambda. mainly for Enumerable only. * vm_args.c (setup_parameters_complex): remove special lambda splatting for [Bug #9605]. [ruby-core:77065] [Bug #12705] * vm_insnhelper.c (vm_callee_setup_block_arg): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58019 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-18test_lambda.rb: remove duplcate testsnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58018 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-18* 2017-03-19svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58017 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-18test_lambda.rb: refine testnobu
* test/ruby/test_lambda.rb (test_lambda_as_iterator): refine a test for the intention of the original report. [ruby-core:61340] [Bug #9605] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58016 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-18vm_args.c: pass blocknobu
* vm_args.c (refine_sym_proc_call): pass block to the method when using refinements. [ruby-core:80219] [Bug #13325] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58015 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-18vm.c: fix up r58012nobu
* vm.c (invoke_iseq_block_from_c): fix stack region length. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58014 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-18vm.c: guard arguments [EXPERIMENTAL]nobu
* vm.c (invoke_iseq_block_from_c): guard arguments on stack, not to be clobbered during splatting. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58012 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-18.gdbinit: suppress gdb message [ci skip]nobu
* .gdbinit (rp): check number of instance variables to get rid of "Invalid number 0 of repetitions." message at an empty object. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58011 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-18.gdbinit: RArray in history [ci skip]nobu
* .gdbinit (rp): put the contents of RArray in value history, for later use. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58010 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-18fix accidental reversal of r57997 in r58000duerst
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58009 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-17io.c: improve docsstomar
* io.c: [DOC] improve and harmonize docs for IO#read and ARGF#read; fix invalid example code for IO#read to make it syntax highlighted. * io.c: [DOC] various improvements for docs of IO, ARGF, and Kernel: fix indent to ensure correct code block detection; sync "outbuf" paragraph for {IO,ARGF}#read, {IO,ARGF}#readpartial, and IO#sysread; fix formatting of call-seq's; improve Kernel#open example to use nil?; fix RDoc markup and typos. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58008 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-17* 2017-03-18svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58007 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-17remove branches in dmark and dfree GC callbacksnormal
dmark and dfree callbacks are never called in gc.c for NULL DATA_PTR values, not even for zombie objects. * compile.c (ibf_loader_mark): remove branch for pointer validity * compile.c (ibf_loader_free): ditto * cont.c (cont_free): ditto * cont.c (fiber_free): ditto * dir.c (dir_free): ditto * ext/stringio/stringio.c (strio_mark): ditto * proc.c (binding_free): ditto * thread_sync.c (mutex_free): ditto * vm.c (thread_free): ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58006 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-17fix a typo [ci skip]kazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58005 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-17vm.c: check stacknobu
* vm.c (invoke_iseq_block_from_c): check stack overflow before pushing arguments. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58004 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-17clarifiy 'codepoint' in documentation of String#each_codepointduerst
Make sure it's clear that the returned values are not Unicode codepoints for encodings other than UTF-8/UTF-16(BE|LE)/UTF-32(BE|LE). [ci skip] [Bug #13321] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58000 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-17* remove trailing spaces.svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57999 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-17Merge rubygems-2.6.11hsbt
This version fixed regression of rubygems-2.6.10. https://github.com/rubygems/rubygems/pull/1856 See details of changelogs for 2.6.11 release: https://github.com/rubygems/rubygems/blob/adfcf40502716080bd9cdfdd2e43bd4296872784/History.txt#L3 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57998 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-17deduplicate static rb_str_format format stringsnormal
Anybody who hits these code paths can hit them again in the future, so try deduplicating across multiple runs of these methods to reduce garbage. * string.c (str_upto_each): fstring on "%.*d" * strftime.c (rb_strftime_with_timespec): fstring on "%0*d" git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57997 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-17deduplicate File::NULL stringnormal
"/dev/null" is a common sight for pre-1.9.3-compatible code targeting *nix systems, so deduplicate it here, as well. * file.c (Init_File): use fstring for File::NULL git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57996 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-17deduplicate "/", ":" and "\n" stringsnormal
"/" and ":" are always statically registered in symbol.c (Init_op_tbl), and "\n" is a commonly seen in source code. * file.c (Init_File): fstring on File::SEPARATOR and File::PATH_SEPARATOR * io.c (Init_IO): fstring on rb_default_rs ("\n") git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57995 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-16NEWS: document shorter opt_str_freeze usagenormal
Users do not read commit messages, but maybe they read NEWS. r57828 ("compile.c: apply opt_str_freeze to String#-@ (uminus)") git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57994 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-16* 2017-03-17svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57993 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-16bignum.c: [DOC] typos and grammarstomar
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57992 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-16rational.c: initialize nnobu
* rational.c (read_num): `n` was used uninitialized when the string started with a period. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57991 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-16rational.c: float denomnobu
* rational.c (parse_rat): allow float as a denominator as well as a numerator. [ruby-core:79104] [Bug #13134] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57990 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-16rational.c: read_numnobu
* rational.c (read_num): use rb_int_parse_cstr to parse integer parts, and make String#to_r consistent with #to_i and #to_f. [ruby-core:80098] [Bug #13105] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57989 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-16bignum.c: rb_int_parse_cstrnobu
* bignum.c (rb_int_parse_cstr): extend rb_cstr_parse_inum with flags. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57988 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-16test_rational.rb: invalid exponentnobu
* test/ruby/test_rational.rb (test_parse): more checks for invalid exponent. [ruby-core:80098] [Bug #13105] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57987 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-16test_rational.rb: duplicate assertionsnobu
* test/ruby/test_rational.rb (test_parse): remove duplicate assertions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57986 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-16rational.c: zero divisionnobu
* rational.c (read_rat_nos): denominator cannot be 0, raise zero division in that case. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57985 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-16* 2017-03-16svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57984 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-16test_rational.rb: shortennobu
* test/ruby/test_rational.rb (test_parse): reduce repeated arguments. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57983 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-15vm_insnhelper.c: adjust indent [ci skip]nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57982 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-15* remove trailing spaces.svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57981 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-15add several counters to analyze ivar inline caches.ko1
* debug_counter.h: add (and renamed) several counters: ivar_get_ic_hit ivar_get_ic_miss ivar_get_ic_miss_serial ivar_get_ic_miss_unset ivar_get_ic_miss_noobject ivar_set_ic_hit ivar_set_ic_miss ivar_set_ic_miss_serial ivar_set_ic_miss_unset ivar_set_ic_miss_oorange ivar_set_ic_miss_noobject ivar_get_base ivar_set_base See related source code to know what counters mean. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57980 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-15object.c: make String#to_f consistent with literalnobu
* object.c (rb_cstr_to_dbl): stop at successive underscores, as well as Float literals. [ruby-core:80098] [Bug #13105] * `_` should be within digits * only one `_` allowed between digits git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57979 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-15string.c: shortcut argument checknobu
* string.c (str_casecmp, str_casecmp_p): split to skip argument check when it is a String certainly. * string.c (sym_casecmp, sym_casecmp_p): shortcut argument checks. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57978 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-15io.c: [DOC] add missing `$`kazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57977 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-14* lib/matrix.rb: Add Vector.zero and Vector#zero?marcandre
Patch by Chia-sheng Chen [#13208] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57976 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-14* 2017-03-15svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57975 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-14Stop a global server of Rinda testmame
This server seemed to cause "leaked file descriptor" warnings. Moved it into the setup/teardown framework. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57974 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-14vm_insnhelper.c: undef BUILTIN_CLASS_P tookazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57973 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-14Fix bug of Tempfile#size if nothing is written [Bug #13198]glass
* lib/tempfile.rb (Tempfile#size): Fix its behavior when nothing is written. Tempfile#size should return 0 in this case. The patch is from nobu <nobu@ruby-lang.org>. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57972 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-14Fix a consistency bug of ISEQ_COVERAGE [Bug #13305]mame
There is an invariant that ISEQ_COVERAGE(iseq) must be Qnil if and only if option->coverage_enabled is false. This invariant was broken by NODE_PRELUDE which updates option->coverage_enabled but not ISEQ_COVERAGE(iseq). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57971 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-14Fiber also has same issue. [Bug #13313]ko1
* thread.c (rb_vm_proc_local_ep): added. * cont.c (rb_fiber_start): use rb_vm_proc_local_ep(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57970 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-14thread.c: Thread.start with Symbolnobu
* thread.c (thread_do_start): fix segfault at start with Symbol. proc created by Symbol#to_proc does not have environment unless using refinements. [ruby-core:80147] [Bug #13313] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57969 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-14thread.c: thread_do_startnobu
* thread.c (thread_do_start): extract from a macro in thread_start_func_2 for debugger. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57968 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-14envutil.rb: basename for diagnostic_reportsnobu
* test/lib/envutil.rb (EnvUtil.diagnostic_reports): diagnostic report file uses base name only. [ci skip] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57967 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-14vm_core.h: assertions for Procnobu
* vm_core.h (vm_proc_block): assert before accessing. * vm_core.h (vm_proc_iseq): remove duplicate assertion. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57966 b2dd03c8-39d4-4d8f-98ff-823fe69b080e