summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-01-09Renamed `seed` as `hash_salt`Nobuyoshi Nakada
The role of this is a so-called "salt" but not "seed", rename to get rid of confusion with other "seed" of PRNG. Notes: Merged: https://github.com/ruby/ruby/pull/2825
2020-01-09Also clear MT to initialize the siphash seedNobuyoshi Nakada
2020-01-09Include the standard `id` command outputNobuyoshi Nakada
On macOS, GNU coreutils `id` is limited to NGROUPS_MAX groups, because of the backward compatibility of getgroups(2).
2020-01-09Fixed up 0eeed5bcc5530edb0af2af2ccff09d067c59e8f9Nobuyoshi Nakada
`Binding#source_location` returns the `__FILE__` when created, and may not be an absolute or real path. And in the `eval` context with an explicit file name, `__dir__` also returns that name. On the other hand, `__FILE__` in `require`d script file has been expanded at searching the library.
2020-01-09vcs.rb: Get rid of Kernel#openNobuyoshi Nakada
2020-01-09lib/net/imap.rb: use `&blk` instead of Kernel#proc with no blockYusuke Endoh
[Bug #16488]
2020-01-08[DOC] Improve docs for String#matchMarcus Stollsteimer
Fix invalid code to make it syntax highlighted; other small fixes.
2020-01-09* 2020-01-09 [ci skip]git
2020-01-08Improve docs for String#=~Marcus Stollsteimer
Move existing example to the corresponding paragraph and add an example for `string =~ regexp` vs. `regexp =~ string`; avoid using the receiver's identifier from the call-seq because it does not appear in rendered HTML docs; mention deprecation of Object#=~; fix some markup and typos.
2020-01-08config.status should be newer than config.cache if existsNobuyoshi Nakada
2020-01-08Hoisted out call_default_procNobuyoshi Nakada
2020-01-08Adjusted indents [ci skip]Nobuyoshi Nakada
2020-01-08Speeds up fallback to Hash#default_proc in rb_hash_aref by removing a method ↵Lourens Naudé
call Notes: Merged: https://github.com/ruby/ruby/pull/2821
2020-01-08Merge bundler-2.1.4Hiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/2822
2020-01-08* 2020-01-08 [ci skip]git
2020-01-08Add GC guardKazuhiro NISHIYAMA
Try to fix infrequent error: https://rubyci.org/logs/rubyci.s3.amazonaws.com/solaris10-sunc/ruby-master/log/20200108T010004Z.fail.html.gz ``` 1) Error: DRbTests::TestDRbSSLCore#test_02_basic_object: RangeError: "348" is recycled object (drbssl://localhost:58371) /export/home/users/chkbuild/cb-sunc/tmp/build/20200108T010004Z/ruby/lib/drb/drb.rb:366:in `_id2ref' (drbssl://localhost:58371) /export/home/users/chkbuild/cb-sunc/tmp/build/20200108T010004Z/ruby/lib/drb/drb.rb:366:in `to_obj' (drbssl://localhost:58371) /export/home/users/chkbuild/cb-sunc/tmp/build/20200108T010004Z/ruby/lib/drb/drb.rb:1537:in `to_obj' (drbssl://localhost:58371) /export/home/users/chkbuild/cb-sunc/tmp/build/20200108T010004Z/ruby/lib/drb/drb.rb:1856:in `to_obj' (drbssl://localhost:58371) /export/home/users/chkbuild/cb-sunc/tmp/build/20200108T010004Z/ruby/lib/drb/drb.rb:620:in `recv_request' (drbssl://localhost:58371) /export/home/users/chkbuild/cb-sunc/tmp/build/20200108T010004Z/ruby/lib/drb/drb.rb:931:in `recv_request' (drbssl://localhost:58371) /export/home/users/chkbuild/cb-sunc/tmp/build/20200108T010004Z/ruby/lib/drb/drb.rb:1665:in `init_with_client' (drbssl://localhost:58371) /export/home/users/chkbuild/cb-sunc/tmp/build/20200108T010004Z/ruby/lib/drb/drb.rb:1677:in `setup_message' (drbssl://localhost:58371) /export/home/users/chkbuild/cb-sunc/tmp/build/20200108T010004Z/ruby/lib/drb/drb.rb:1641:in `perform' (drbssl://localhost:58371) /export/home/users/chkbuild/cb-sunc/tmp/build/20200108T010004Z/ruby/lib/drb/drb.rb:1734:in `block (2 levels) in main_loop' (drbssl://localhost:58371) /export/home/users/chkbuild/cb-sunc/tmp/build/20200108T010004Z/ruby/lib/drb/drb.rb:1730:in `loop' (drbssl://localhost:58371) /export/home/users/chkbuild/cb-sunc/tmp/build/20200108T010004Z/ruby/lib/drb/drb.rb:1730:in `block in main_loop' /export/home/users/chkbuild/cb-sunc/tmp/build/20200108T010004Z/ruby/test/drb/drbtest.rb:163:in `test_02_basic_object' ```
2020-01-07Disable IPv6 on Travis s390x case. (#2819)Jun Aruga
This fixes following error that sometimes happens once in a few times on Travis s390x environment. ``` $ tool/travis_retry.sh sudo -E apt-add-repository -y "ppa:ubuntu-toolchain-r/test" + sudo -E apt-add-repository -y ppa:ubuntu-toolchain-r/test Error: retrieving gpg key timed out. ```
2020-01-06always expand ivar arrays to max widthAaron Patterson
If the instance variable table hasn't been "expanded", allocate the maximum size of the ivar table. This operates under the assumption that most objects will eventually expand their ivar array to the maximum width anyway, so we may as well avoid realloc calls. Notes: Merged: https://github.com/ruby/ruby/pull/2820
2020-01-07* 2020-01-07 [ci skip]git
2020-01-07Suppress some warningsYusuke Endoh
``` .../ruby/test/ruby/test_keyword.rb:3509: warning: assigned but unused variable - bug8993 .../ruby/test/ruby/test_object.rb:83: warning: assigned but unused variable - f .../ruby/test/ruby/test_object.rb:95: warning: method redefined; discarding old initialize_clone .../ruby/test/ruby/test_object.rb:84: warning: previous definition of initialize_clone was here ```
2020-01-06Support history-size in .inputrc correctlyaycabta
2020-01-06Slightly change the job wording [ci skip]Takashi Kokubun
mame-san said it's weird
2020-01-06Support running Actions on a forkTakashi Kokubun
Since 8c9450e7b875db846b19cc631af0d7fee66db5c6, we increased the chance to run GitHub Actions on a fork, as we usually use a topic branch instead of master when filing a pull request. This patch makes it possible to reuse the same GitHub Actions config on a fork repository.
2020-01-06Directly refer to GitHub eventsTakashi Kokubun
instead of unnecessarily defining env vars
2020-01-06[flori/json] Add :nodoc: for GeneratorMethodszverok
https://github.com/flori/json/commit/2f3f44c180
2020-01-06[flori/json] Fix examples syntaxzverok
https://github.com/flori/json/commit/3845491d92
2020-01-06[flori/json] Enchance generic JSON and #generate docszverok
https://github.com/flori/json/commit/4ede0a7d19
2020-01-06[flori/json] Remove invalid JSON.generate description from JSON module rdocJeremy Evans
This text used to be true in older versions of json, but has not been true for a number of years (since json version 2 I think). https://github.com/flori/json/commit/373b633f38
2020-01-06support RUBY_ON_BUG envval on assert failure.Koichi Sasada
Check RUBY_ON_BUG env val also on rb_assert_failure().
2020-01-06script_compiled event on compile error.Koichi Sasada
script_compiled event for TracePoint should not be invoked on compile error (SyntaxError) because it is not "compiled". [Bug #16459]
2020-01-06* 2020-01-06 [ci skip]git
2020-01-06Complete indented and quoted string correctlyaycabta
def foo ''.upca[TAB] This will be completed to be: def foo ''.upcase The indent was gone. This commit fixes the bug.
2020-01-05Rescue EOFErroraycabta
If C-d is pressed before IRB is ready, IRB crashes because EOFError occurs.
2020-01-05Fix OpenStructDocumentationzverok
In https://github.com/ruby/ruby/commit/9be3295d53b6fd9f8a3ad8157aa0655b1976d8ac, OpenStruct's documentation stopped to be rendered by RDoc (there should be no additional code between documentation comment and documented class). Fixing this. Notes: Merged: https://github.com/ruby/ruby/pull/2810
2020-01-05Remove unused tmp_buffer in class.cKazuhiro NISHIYAMA
ref 44a164c26f5371519636585d8ba7aa59f489442e and beae6cbf0fd8b6619e5212552de98022d4c4d4d4
2020-01-05Remove unused last_idx in class.cKazuhiro NISHIYAMA
ref c7f01d889becbeffc4254e1b0b7faecb80ea3f3e and beae6cbf0fd8b6619e5212552de98022d4c4d4d4
2020-01-05parse.y: fix a wrong sizeof argument for ruby_sized_xfreeYusuke Endoh
2020-01-05include/ruby/ruby.h: remove a variable tmp_buffer as it does not changeYusuke Endoh
It is no longer used due to beae6cbf0fd8b6619e5212552de98022d4c4d4d4. Coverity Scan found this.
2020-01-05include/ruby/ruby.h: remove last_idx that is no longer variableYusuke Endoh
Due to beae6cbf0fd8b6619e5212552de98022d4c4d4d4, the variable last_idx is no longer changed and always -1. This change simplifies the code by removing the variable. Coverity Scan pointed out this.
2020-01-05[ruby/reline] Sort completion listKOBAYASHI Shuji
#### Legacy mode: ```console $ irb --legacy irb(main):001:0> l[TAB][TAB] lambda load local_variables loop ``` #### Before this patch: ```console $ irb irb(main):001:0> l[TAB][TAB] local_variables loop lambda load ``` #### After this patch: ```console $ irb irb(main):001:0> l[TAB][TAB] lambda load local_variables loop ``` https://github.com/ruby/reline/commit/6074069c7d
2020-01-05* 2020-01-05 [ci skip]git
2020-01-05Fix output of example [ci skip]Kazuhiro NISHIYAMA
2020-01-04* 2020-01-04 [ci skip]git
2020-01-03Call initialize_clone with freeze: false if clone called with freeze: falseJeremy Evans
This makes it possible to initialize_clone to correctly not freeze internal state if the freeze: false keyword is passed to clone. If clone is called with freeze: true or no keyword, do not pass a second argument to initialize_clone to keep backwards compatibility. This makes it so that external libraries that override initialize_clone but do not support the freeze keyword will fail with ArgumentError if passing freeze: false to clone. I think that is better than the current behavior, which succeeds but results in an unfrozen object with frozen internals. Fix related issues in set and delegate in stdlib. Fixes [Bug #14266] Notes: Merged: https://github.com/ruby/ruby/pull/2816
2020-01-03Make eval(code, binding) use (eval) as __FILE__ and 1 as __LINE__Jeremy Evans
This removes the warning that was added in 3802fb92ff8c83eed3e867db20f72c53932f542d, and switches the behavior so that the eval does not use the binding's __FILE__ and __LINE__ implicitly. Fixes [Bug #4352] Notes: Merged: https://github.com/ruby/ruby/pull/2816
2020-01-03Fix unused warningsKazuhiro NISHIYAMA
http://ci.rvm.jp/results/trunk_gcc7@silicon-docker/2539622 ``` /tmp/ruby/v2/src/trunk_gcc7/class.c: In function 'rb_scan_args_parse': /tmp/ruby/v2/src/trunk_gcc7/class.c:1971:12: warning: unused variable 'tmp_buffer' [-Wunused-variable] VALUE *tmp_buffer = arg->tmp_buffer; ^~~~~~~~~~ ``` ``` In file included from /tmp/ruby/v2/src/trunk_gcc7/vm_insnhelper.c:1895:0, from /tmp/ruby/v2/src/trunk_gcc7/vm.c:349: /tmp/ruby/v2/src/trunk_gcc7/vm_args.c:212:1: warning: 'args_stored_kw_argv_to_hash' defined but not used [-Wunused-function] args_stored_kw_argv_to_hash(struct args_info *args) ^~~~~~~~~~~~~~~~~~~~~~~~~~~ ```
2020-01-02Update specs for keyword argument separationJeremy Evans
Notes: Merged: https://github.com/ruby/ruby/pull/2794
2020-01-02Update tests for full keyword argument separationJeremy Evans
Notes: Merged: https://github.com/ruby/ruby/pull/2794
2020-01-02Fully separate positional arguments and keyword argumentsJeremy Evans
This removes the warnings added in 2.7, and changes the behavior so that a final positional hash is not treated as keywords or vice-versa. To handle the arg_setup_block splat case correctly with keyword arguments, we need to check if we are taking a keyword hash. That case didn't have a test, but it affects real-world code, so add a test for it. This removes rb_empty_keyword_given_p() and related code, as that is not needed in Ruby 3. The empty keyword case is the same as the no keyword case in Ruby 3. This changes rb_scan_args to implement keyword argument separation for C functions when the : character is used. For backwards compatibility, it returns a duped hash. This is a bad idea for performance, but not duping the hash breaks at least Enumerator::ArithmeticSequence#inspect. Instead of having RB_PASS_CALLED_KEYWORDS be a number, simplify the code by just making it be rb_keyword_given_p(). Notes: Merged: https://github.com/ruby/ruby/pull/2794
2020-01-02Bump benchmark-driver to v0.15.7 (#2811)Lourens Naudé