aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* array.c (rb_mem_clear): remove "register" from argumentsYusuke Endoh2019-10-042-2/+2
| | | | | | | | | | | | | | | | to suppress the following warning: ``` compiling cxxanyargs.cpp In file included from cxxanyargs.cpp:1: In file included from ../../.././include/ruby/ruby.h:2150: ../../.././include/ruby/intern.h:56:19: warning: 'register' storage class specifier is deprecated and incompatible with C++17 [-Wdeprecated-register] void rb_mem_clear(register VALUE*, register long); ^~~~~~~~~ ../../.././include/ruby/intern.h:56:36: warning: 'register' storage class specifier is deprecated and incompatible with C++17 [-Wdeprecated-register] void rb_mem_clear(register VALUE*, register long); ^~~~~~~~~ ```
* Remove call-seq for method that doesn't exist (#2521)Alan Wu2019-10-041-1/+0
| | | | | | | | | | | | ``` $ ruby -ve 'IO.popen("ls"){}; $?.to_int' ruby 2.6.4p104 (2019-08-28 revision 67798) [x86_64-darwin18] Traceback (most recent call last): -e:1:in `<main>': undefined method `to_int' for #<Process::Status: pid 33989 SIGPIPE (signal 13)> (NoMethodError) Did you mean? to_i taint ``` Process::Status#to_int was removed at 7ba5c4e.
* Revert "Simplify bin_path_spec.rb guard"Takashi Kokubun2019-10-031-1/+1
| | | | | | | | This reverts commit a56d742e69aa8a3a1fe92fc515d93f6e51cf5fbc. I was checking the CI result of the wrong revision. It actually worked fine https://ci.appveyor.com/project/ruby/ruby/builds/27866303. Never mind...
* Simplify bin_path_spec.rb guardTakashi Kokubun2019-10-031-1/+1
| | | | | For some reason the guard_not seems not working as expected https://ci.appveyor.com/project/ruby/ruby/builds/27866153/job/v6wa6q6p7b7n7r37
* Ignore arm32 failure for nowTakashi Kokubun2019-10-031-0/+1
|
* bin_path_spec.rb has failed from the beginningTakashi Kokubun2019-10-031-1/+1
| | | | | for mswin. This spec is not valid for mswin platform. https://ci.appveyor.com/project/ruby/ruby/builds/27748774/job/85khngfpc806m5lj
* Try disabling build on trunkTakashi Kokubun2019-10-031-6/+6
|
* Document *_kw functions added to include/ruby/ruby.h [ci skip]Jeremy Evans2019-10-031-6/+107
| | | | | Also documents the non-*_kw functions if they were not already documented.
* Add documentation regarding keyword argument separation [ci skip]Jeremy Evans2019-10-032-1/+97
|
* Minor updates to methods and calling_methods documentation [ci skip]Jeremy Evans2019-10-032-24/+32
|
* Enable Drone CI for ARM 64/32-bit cases. (#2520)Jun Aruga2019-10-041-0/+65
| | | https://bugs.ruby-lang.org/issues/16234
* iseq.c (rb_iseq_compile_with_option): dummy parent_iseq for the parserYusuke Endoh2019-10-041-1/+8
| | | | | | | | | | | | | | | | The parsing of `RubyVM::InstructionSequence.compile` does not support an outer scope currently. So it specified NULL as parent_iseq for the parser. However, it resulted in the following false-positive warning. ``` RubyVM::InstructionSequence.compile(<<END) o = Object.new o #=> <compiled>:2: warning: possibly useless use of a variable in void context END ``` This change specifies a dummy empty parent_iseq instead of NULL, which suppresses the false positive.
* parse.y: use "struct rb_iseq_struct" instead of rb_iseq_tYusuke Endoh2019-10-041-2/+2
| | | | typedef was not declared in parse.y. Sorry.
* * 2019-10-04 [ci skip]git2019-10-041-1/+1
|
* Make parser_params have parent_iseq instead of base_blockYusuke Endoh2019-10-045-19/+16
| | | | | | | | | | | | The parser needs to determine whether a local varaiable is defined or not in outer scope. For the sake, "base_block" field has kept the outer block. However, the whole block was actually unneeded; the parser used only base_block->iseq. So, this change lets parser_params have the iseq directly, instead of the whole block.
* Refactor parser_params by removing "in_main" flagYusuke Endoh2019-10-042-14/+8
| | | | | | | | | | | | | | | | | | | The relation between parser_param#base_block and #in_main were very subtle. A main script (that is passed via a command line) was parsed under base_block = TOPLEVEL_BINDING and in_main = 1. A script loaded by Kernel#require was parsed under base_block = NULL and in_main = 0. If base_block is non-NULL and in_main == 0, it is parsed by Kernel#eval or family. However, we know that TOPLEVEL_BINDING has no local variables when a main script is parsed. So, we don't have to parse a main script under base_block = TOPLEVEL_BINDING. Instead, this change parses a main script under base_block = 0. If base_block is non-NULL, it is parsed by Kernel#eval or family. By this simplication, "in_main" is no longer needed.
* make-snapshot: touch updated files after preparedNobuyoshi Nakada2019-10-031-2/+2
| | | | | Align mtime of files updated by `make prepare-package` to make packages reproducible.
* make-snapshot: suppress make error messages unless failedNobuyoshi Nakada2019-10-031-14/+30
|
* make-snapshot: copy cache files instead of linkingNobuyoshi Nakada2019-10-031-6/+1
| | | | To get rid of setting mode and mtime of the original cache files.
* vcs.rb: fix to export git-svn versionNobuyoshi Nakada2019-10-031-26/+32
| | | | | | * Use the given branch name instead of implicit 'HEAD". * Format like as git-svn when `from` or `to` is SVN revision number.
* [ruby/fileutils] Use pend instead of skipHiroshi SHIBATA2019-10-031-2/+2
| | | | https://github.com/ruby/fileutils/commit/ba2c24e2d7
* [ruby/fileutils] improve the compatibility of minitestHiroshi SHIBATA2019-10-031-1/+2
| | | | https://github.com/ruby/fileutils/commit/f16f5a0dd6
* add debug counters for vm_search_method_slowpath()卜部昌平2019-10-032-0/+15
| | | | | Implemented fine-grained inspection of cache misshits. Handy for counting the reasons why an inline method cache was evicted.
* use bind_call for test-all --gc-stress卜部昌平2019-10-031-1/+1
| | | | | This one allocation of Method object is worth avoiding. We don't want to test UnboundMethod#bind right here. GC need not run.
* Resolve unused local variable reported by LGTMRomain Tartière2019-10-031-1/+1
| | | | | | | | | LGTM reports that the value assigned to local variable 'shared' is never used: https://lgtm.com/projects/g/ruby/ruby/snapshot/f319a5d064627c6641817ec2ed16b97b4d215148/files/misc/lldb_cruby.py#x6512c0281581a470:1 This problem was introduced in by the refactoring that took place in 7c496b6624f720d539e3c0b40f122a9422a13b99.
* * 2019-10-03 [ci skip]git2019-10-031-1/+1
|
* * expand tabs. [ci skip]git2019-10-031-7/+7
| | | | | Tabs were expanded because previously the file did not have any tab indentation. Please update your editor config, and use misc/expand_tabs.rb in the pre-commit hook.
* Revert https://github.com/ruby/ruby/pull/2486卜部昌平2019-10-0314-501/+391
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commits: 10d6a3aca7 8ba48c1b85 fba8627dc1 dd883de5ba 6c6a25feca 167e6b48f1 7cb96d41a5 3207979278 595b3c4fdd 1521f7cf89 c11c5e69ac cf33608203 3632a812c0 f56506be0d 86427a3219 . The reason for the revert is that we observe ABA problem around inline method cache. When a cache misshits, we search for a method entry. And if the entry is identical to what was cached before, we reuse the cache. But the commits we are reverting here introduced situations where a method entry is freed, then the identical memory region is used for another method entry. An inline method cache cannot detect that ABA. Here is a code that reproduce such situation: ```ruby require 'prime' class << Integer alias org_sqrt sqrt def sqrt(n) raise end GC.stress = true Prime.each(7*37){} rescue nil # <- Here we populate CC class << Object.new; end # These adjacent remove-then-alias maneuver # frees a method entry, then immediately # reuses it for another. remove_method :sqrt alias sqrt org_sqrt end Prime.each(7*37).to_a # <- SEGV ```
* Treat return in block in class/module as LocalJumpError (#2511)Jeremy Evans2019-10-023-11/+20
| | | | | | return directly in class/module is an error, so return in proc in class/module should also be an error. I believe the previous behavior was an unintentional oversight during the addition of top-level return in 2.4.
* fix assertion number.Koichi Sasada2019-10-021-1/+1
| | | | | On parallel test, there are additional tests because of implicit checkers which are enabled on 84cbce3d88.
* Fixed failure message for `clean-cache`Nobuyoshi Nakada2019-10-021-1/+1
|
* Enable checkers on parallel test.Koichi Sasada2019-10-023-5/+14
| | | | | | | | | parallel test (`make test-all TESTS=-j8`) runs tests on specified number of processes. However, some test checkers written in `runner.rb` are not loaded. This fix enable these checkers on parallel tests. See also: https://github.com/ruby/ruby/pull/2508
* Iseq#to_binary: dump flag for **nil (#2508)Alan Wu2019-10-022-5/+18
| | | | RUBY_ISEQ_DUMP_DEBUG=to_binary and the attached test case was failing. Dump the flag to make sure `**nil` can round-trip properly.
* * 2019-10-02 [ci skip]git2019-10-021-1/+1
|
* Fix the order of executing `after-update` taskNAKAMURA Usaku2019-10-021-3/+7
|
* Should fail if `system` failedNAKAMURA Usaku2019-10-021-3/+12
|
* expose assert_raise and assert_join_threadsHiroshi SHIBATA2019-10-012-116/+121
|
* Remove draft-release.yml [ci skip]Kazuhiro NISHIYAMA2019-10-011-163/+0
| | | | | | I thought default branch's workflow runs on any tags, but it does not run for stable branches without draft-release.yml. So I abandoned, and use workflow in ruby/actions instead.
* WEBrick: prevent response splitting and header injectionYusuke Endoh2019-10-012-3/+46
| | | | | | | | This is a follow up to d9d4a28f1cdd05a0e8dabb36d747d40bbcc30f16. The commit prevented CRLR, but did not address an isolated CR or an isolated LF. Co-Authored-By: NARUSE, Yui <naruse@airemix.jp>
* Loop with String#scan without creating substringsNobuyoshi Nakada2019-10-012-17/+24
| | | | | Create the substrings necessary parts only, instead of cutting the rest of the buffer. Also removed a useless, probable typo, regexp.
* Fix for wrong fnmatch pattternNobuyoshi Nakada2019-10-012-1/+7
| | | | | * dir.c (file_s_fnmatch): ensure that pattern does not contain a NUL character. https://hackerone.com/reports/449617
* ext/-test-/enumerator_kw/enumerator_kw.c: remove unused variableYusuke Endoh2019-10-011-1/+1
|
* * 2019-10-01 [ci skip]git2019-10-011-2/+2
|
* remove `unused var` warningKoichi Sasada2019-10-011-0/+1
|
* Issue keyword flag warning even with no argumentsJeremy Evans2019-09-301-1/+1
| | | | | | If the keyword flag is set, there should be at least one argument, if there isn't, that is a sign the keyword flag was passed when it should not have been.
* Add rb_enumeratorize_with_size_kw and related macrosJeremy Evans2019-09-307-7/+85
| | | | | | | | | | Currently, there is not a way to create a sized enumerator in C with a different set of arguments than provided by Ruby, and correctly handle keyword arguments. This function allows that. The need for this is fairly uncommon, but it occurs at least in Enumerator.produce, which takes arugments from Ruby but calls rb_enumeratorize_with_size with a different set of arguments.
* test/ruby/test_io.rb: supress a "method redefined" warningYusuke Endoh2019-09-301-0/+3
| | | | by explicitly removing the old definition.
* test/-ext-/string/test_fstring.rb: suppress "possibly useless use of -@"Yusuke Endoh2019-09-301-1/+1
| | | | "in void context" by assigning the result to a dummy variable.
* Revert "introduce debug check."Koichi Sasada2019-09-301-11/+0
| | | | | | This reverts commit c3b84f2de83a27acc638f99743bfa2c44bac621c. Backtrace shows it is before running tests and debug check was nonsense.
* Fix assertionNobuyoshi Nakada2019-09-301-1/+1
| | | | callable_method_entry_p is for rb_callable_method_entry_t.