summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-03-13Add FileUtils#cp_lrmame
* lib/fileutils.rb: Add FileUtils#cp_lr. This method creates hard links of each file from directory to another directory recursively. This patch is based on Thomas Sawyers and Zachary Scott. [Feature #4189] [ruby-core:33820] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62739 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-13Rename test classes to allow stable test count when running test-all -jnobu
[Fix GH-1763] From: MSP-Greg <MSP-Greg@users.noreply.github.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62738 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-13eval_error.c: reset attributesnobu
* eval_error.c (print_errinfo): reset all attributes for each lines before newlines. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62737 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-13eval_error.c: last newlinenobu
* eval_error.c (print_errinfo): do not print an empty line at the end when the message ends with a newline. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62736 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-13test_enumerator.rb: duplicate assertionsnobu
* test/ruby/test_enumerator.rb (test_uniq): remove assertions which ared duplicate of lazy enumerator tests in test_lazy_enumerator.rb. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62735 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-13Add missing class FrozenError to Exception subclasses list documentationnobu
[Fix GH-1818] From: Miguel Landaeta <miguel@miguel.cc> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62734 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-13Hash instead of Setnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62733 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-13Speed up func1.func2 completion by using Set for ignored modulesnobu
And thus avoiding Module#name calls. Those are slow, especially in larger projects, with lots of anonymous modules. [Fix GH-1798] From: Dmitry Gutov <dgutov@yandex.ru> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62732 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-13Bug Fix Enumerator::Lazy#uniq state for multiple callnobu
* enumerator.c (lazy_uniq_i): create new hash for each calls. [Fix GH-1820] Currently 2.5.0-preview1 :001 > arr = (0..100).lazy.uniq{|i| i % 10} => #<Enumerator::Lazy: #<Enumerator::Lazy: 0..100>:uniq> 2.5.0-preview1 :002 > arr.to_a => [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] 2.5.0-preview1 :003 > arr.to_a => [] Expected arr.to_a to always return same output From: Anmol Chopra <anmolchopra@rocketbox.in> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62731 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-12* 2018-03-13svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62730 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-12assertions.rb: parenthesesnobu
* test/lib/test/unit/assertions.rb (assert_not_all): fix missing parentheses. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62729 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-12eval_error.c: fix underflownobu
* eval_error.c (print_errinfo): get rid of negative string length. [ruby-core:86086] [Bug #14598] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62728 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-12ripper: fix escaped spacenobu
* parse.y: use tSP same as ripper instead of tSPACE. [ruby-core:86080] [Bug #14597] * ext/ripper/eventids2.c: tSP is defined in ripper.c now. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62727 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-12* 2018-03-12svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62726 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-12Fix setting method visibility on method wrapped with prependnobu
Ignore prepended modules when looking for already defined methods on a class to set the visibility on. [Fix GH-1834] From: Dylan Thacker-Smith <Dylan.Smith@shopify.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62725 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-11parse.y: fix interpolated string literal dedentnobu
* parse.y (heredoc_dedent): fix interpolated string literal dedent, remove indentations from only nodes with the newline flag. [ruby-core:85983] [Bug #14584] * parse.y (here_document): set the newline flag on literal string nodes starting at the beginning of line. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62724 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-11parse.y: reduce duplicate codenobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62723 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-11test_jit.rb: show debugging output on stderrk0kubun
instead of stdout. We would not capture the output as test results. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62722 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-11test_jit.rb: fix typok0kubun
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62721 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-11test_jit.rb: add debugging outputk0kubun
Sometimes gcc fails to exec cc1 like this: https://gist.github.com/ko1/c3db8b193e9cc65c39c541e10d957509 I'm not sure why it happens at all. Please let me add this debugging output to inspect the random failure on CI for now. I'll remove this after we confirm it's not helpful. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62720 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-11* 2018-03-11svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62719 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-11re.c: fixed escaped multibyte charnobu
* re.c (unescape_nonascii): escaped multibyte character should be copied as-is, just with checking if the encoding matches. https://twitter.com/sakuro/status/972014409986883584 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62718 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-10compile.c: mark all ISeq ancestors as catch_except_pk0kubun
This change assumes that continuously reading `parent_iseq` from block ISeq would reach non-block ISeq finally. test/ruby/test_jit.rb: add test that catches 2-depth exception Combination of r62654 and r62678 caused following error in this test. -e:12:in `wrapper': Stack consistency error (sp: 14, bp: 13) (fatal) == disasm: #<ISeq:wrapper@-e:10 (10,0)-(12,3)> (catch: FALSE)=========== local table (size: 2, argc: 2 [opts: 0, rest: -1, post: 0, block: -1, kw: -1@-1, kwrest: -1]) [ 2] paths<Arg> [ 1] prefixes<Arg> 0000 putself ( 11)[LiCa] 0001 getlocal_WC_0 paths 0003 getlocal_WC_0 prefixes 0005 opt_send_without_block <callinfo!mid:catch_true, argc:2, FCALL|ARGS_SIMPLE>, <callcache> 0008 leave ( 12)[Re] As you can see, it says `catch: FALSE`, but obviously it catches exception raised from `return path`. As of r62655, it was kind of intentional because I only cared about expiration of JIT-ed frame and I've thought calling `vm_exec` is only needed once for it. So r62654 was NOT actually checking if it may catch exception. But for r62678, obviously we should set catch_except_p=TRUE for all ISeqs which may catch exception. Otherwise catch table lookup would fail. With this bugfix, code generated by r62655 might be worse, but at least while loop can be marked as `catch: FALSE` as expected. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62717 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-10signal.c: refine error messagesnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62716 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-10signal.c: check NUL bytesnobu
* signal.c (trap_signm): check NUL bytes explicitly before raising "unsupported signal" ArgumentError. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62715 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-10mjit.c: keep mutex unlocked on destroyk0kubun
`mjit_finish` may destroy mutex even while it's still locked by `worker` by race condition. That would result in the following error: [BUG] pthread_mutex_destroy: Device or resource busy (EBUSY) Actually I couldn't get a core dump for it and reproduce it multiple times. So I'm not sure this fixes the issue which I faced or not. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62714 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-10ext/win32ole/win32ole.c: fix typo. [ci skip]suke
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62713 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-10* ext/win32ole/win32ole.c: fix url of ActiveState. Thanks to Kazuhiro ↵suke
Nishiyama. [ci skip] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62710 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-10Fix warning: cast from pointer to integer of different sizekazu
``` .../ruby/iseq.c: In function ‘rb_vm_insn_null_translator’: .../ruby/iseq.c:137:12: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] return (int)addr; ^ ``` git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62709 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-10Fix error: implicit conversion loses integer precisionkazu
http://ci.rvm.jp/results/trunk_clang_50@silicon-docker/627906 ``` iseq.h:41:36: error: implicit conversion loses integer precision: 'rb_num_t' (aka 'unsigned long') to 'int' [-Werror,-Wshorten-64-to-32] int cnt = iseq->body->variable.flip_count; ~~~ ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~ ``` git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62708 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-09* 2018-03-10svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62707 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-09Add direct marking on iseq operandstenderlove
Directly marking iseq operands allows us to eliminate the "mark array" stored on ISEQ objects, which will reduce the amount of memory ISEQ objects consume. This patch changes the iseq mark function to: * Directly marks ISEQ operands * Iterate over and mark child ISEQs It also introduces two flags on the ISEQ object. In order to mark instruction operands, we have to disassemble the instructions and find the instruction parameters and types. Instructions may also be translated to jump addresses. Instruction sequences may get marked by the GC *while* they're mid flight (being compiled). The `ISEQ_TRANSLATED` flag is used to indicate whether or not the instructions have been translated to jump addresses so that when we decode the instructions we know whether or not we need to go from jump location back to original instruction or not. Not all ISEQ objects have any markable objects embedded in their instructions. We can detect whether or not an ISEQ has markable objects in the instructions at compile time. If the instructions contain markable objects, we set a flag `ISEQ_MARKABLE_ISEQ` on the ISEQ object. This means that during the mark phase, we can skip decompilation if the flag is *not* set. In other words, we can avoid decompilation of we know in advance there is nothing to mark. `once` instructions have an operand that contains the result of a one-time compilation of a regex. Before this patch, that operand was called an "inline cache", even though the struct was actually an "inline storage". This patch changes the operand to be an "inline storage" so that we can differentiate between caches that need marking (the inline storage) and caches that don't need marking (inline cache). [ruby-core:84909] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62706 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-09configure.ac: --disable-mathn optionnobu
* Makefile.in, win32/Makefile.sub: move CANONICALIZATION_FOR_MATHN from config.h which affects all extension libraries to XCFLAGS for the core only. * configure.ac: added --disable-mathn option. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62705 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-09math.c: calling ordernobu
* math.c (math_log, rb_math_log): inverted calling order, to remove unused argument. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62704 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-09Removed useless assertions [ci skip]nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62703 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-09rational.c: removed redundant conditionsnobu
Fixnums can be compared by object values themselves only. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62702 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-09complex.c: removed redundant conditionsnobu
Fixnums can be compared by object values themselves only. Addition/subtraction/mulplication of fixnum 0 do not affect the sign. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62701 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-09complex.c: removed already unused macrosnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62700 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-08* 2018-03-09svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62699 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-08Raise ArgumentError if host component is nilnaruse
From: oss92 <mohamed.o.alnagdy@gmail.com> fix https://github.com/ruby/ruby/pull/1278 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62698 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-08Fix a typo [ci skip]kazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62697 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-08* 2018-03-08svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62696 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-08fix error if the input is mixed Unicode and percent-escapesnaruse
Reported by kivikakk (Ashe Connor) with tests and doc fix Patch based on mame and fix by naruse [Bug #14586] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62695 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-07transform_mjit_header.rb: inline ivar operationsk0kubun
* Optcarrot before,--jit: ruby 2.6.0dev (2018-03-07 trunk 62689) +JIT [x86_64-linux] after,--jit: ruby 2.6.0dev (2018-03-07 trunk 62689) +JIT [x86_64-linux] last_commit=transform_mjit_header.rb: inline ivar operations Calculating ------------------------------------- before,--jit after,--jit optcarrot 67.852 69.359 fps Comparison: optcarrot after,--jit: 69.4 fps before,--jit: 67.9 fps - 1.02x slower git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62693 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-07complex.c: check typenobu
* complex.c (m_cos, m_sin): determine the type by the internal type, not by a method. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62689 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-07complex.c: check typenobu
* complex.c (nucomp_s_canonicalize_internal): determine the type by the internal type, not by a method. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62688 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-07complex.c, rational.c: no backrefnobu
Since r37702, parsing complex and rational do not use regexp. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62687 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-07complex.c, rational.c: adjust indentnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62686 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-07date_core.c: check conversionnobu
* ext/date/date_core.c (offset_to_sec, d_lite_plus): check conversion results, to get rid of infinite recursion. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62685 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-07test_date_arith.rb: needs `test_` prefixnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62684 b2dd03c8-39d4-4d8f-98ff-823fe69b080e