summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-10-15Maintain the intention of comment in Travis matrixTakashi Kokubun
2019-10-15Remove arm64 build from DroneTakashi Kokubun
because it started to run on Travis.
2019-10-15Disable ccache on arm64 buildTakashi Kokubun
Follow up https://github.com/ruby/ruby/pull/2559 According to experiments in https://github.com/ruby/ruby/pull/2560, disabling cache seems to make arm64 build succeed.
2019-10-15Enforce --jit-debug test by another wayTakashi Kokubun
2019-10-15Fix test path on travis buildTakashi Kokubun
2019-10-15Test without --jit-debug by defaultTakashi Kokubun
and let RUBY_DEBUG=1 job test it. We usually don't use --jit-debug and we should test no --jit-debug by default.
2019-10-15Add arm64 case on Travis. (#2559)Jun Aruga
misc-16234
2019-10-15Dup hash with keyword flag when converted to keywordsJeremy Evans
When ruby2_keywords is used on a method, keywords passed to the method are flagged. When the hash is passed as the last element of an argument splat to another method, the hash should be treated as a keyword splat. When keyword splatting a hash, a duplicate of the hash is made. So when auto-splatting the hash with the keyword flag, a duplicate of the hash should also be made. This fixes cases where the hash is later passed to another method and would be treated as keywords there: class Object ruby2_keywords def foo(*a) bar(*a) end def bar(*a) baz(*a) end def baz(*a, **kw) [a, kw] end end foo(:a=>1) Previously, this would pass the :a=>1 as keywords to bar and also as keywords to baz. Now it only passes :a=>1 as keywords to bar, but bar passes :a=>1 as a positional hash to baz (which in this case generates a warning in 2.7).
2019-10-16Support backspace in incremental searchaycabta
2019-10-16C-r is incremental history search in vi insert modeaycabta
2019-10-16* 2019-10-16 [ci skip]git
2019-10-16Comparable#clamp with a range [Feature #14784]Nobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/2556
2019-10-15test/csv/write/test_general.rb: suppress warningsYusuke Endoh
of "setting Encoding.default_internal".
2019-10-15Fixed the key to delete [Bug #16250]Nobuyoshi Nakada
https://github.com/ruby/ruby/commit/f94202fcc228d0348ca050a7b18a8f8a538a7305#commitcomment-35505076 Co-Authored-By: Ary Borenszweig <asterite@gmail.com>
2019-10-15[DOC] fixed a variable name [ci skip]Nobuyoshi Nakada
replaced "anObject" with "obj". also marked up with simple `_`s instead of `<i>`.
2019-10-15[rubygems/rubygems] Bump version to 3.1.0.pre2Hiroshi SHIBATA
https://github.com/rubygems/rubygems/commit/a7a673ce22
2019-10-15[rubygems/rubygems] Also bump test variableHiroshi SHIBATA
https://github.com/rubygems/rubygems/commit/97e9768612
2019-10-15Remove duplicated `.` [ci skip]Kazuhiro NISHIYAMA
2019-10-15Use compare_by_identity hash [Bug #16250]Nobuyoshi Nakada
2019-10-15Try to avoid random failureKazuhiro NISHIYAMA
https://rubyci.org/logs/rubyci.s3.amazonaws.com/openbsd-current/ruby-master/log/20191015T070011Z.fail.html.gz ``` 1) Failure: TestProcess#test_kill_at_spawn_failure [/home/chkbuild/chkbuild/tmp/build/20191015T070011Z/ruby/test/ruby/test_process.rb:2276]: [ruby-core:69304] [Bug #11166]. <#<Thread:0x000009f60a7cac40@/home/chkbuild/chkbuild/tmp/build/20191015T070011Z/ruby/test/ruby/test_process.rb:2272 dead>> expected but was <nil>. ``
2019-10-14Simplify circular reference check of IRB::ColorTakashi Kokubun
2019-10-14IRB colorize: take into account recursive arrays and hashes (#2555)Ary Borenszweig
[Bug #16250]
2019-10-15* 2019-10-15 [ci skip]git
2019-10-14Update documentation for File#{readable,writable,executable}{,_real}? [ci skip]Jeremy Evans
Some OS-level security features cause these methods to not return expected results. For example fs.protected_regular sysctl on Linux, or pledge(2)/unveil(2) on OpenBSD. Fixes [Bug #16002]
2019-10-14add require "monitor"Masatoshi SEKI
2019-10-14Automatically close fds on fork (and GC). The connection pools are ↵Masatoshi SEKI
maintained at thread scope.
2019-10-14[flori/json] fix test as reported in #343Florian Frank
https://github.com/flori/json/commit/565c72ba9e
2019-10-14[flori/json] Add ascii_only option to JSON::Ext::Generator::State.new.Sho Hashimoto
https://github.com/flori/json/commit/0e99a9aac5
2019-10-14[flori/json] Add shortcut converting to StringWatson
In where to convert Hash key to String for json, this patch will add shortcut for String/Symbol in Hash key. ``` $ ruby bench_json_generate.rb Warming up -------------------------------------- json 65.000 i/100ms Calculating ------------------------------------- json 659.576 (± 1.5%) i/s - 3.315k in 5.027127s ``` ``` $ ruby bench_json_generate.rb Warming up -------------------------------------- json 78.000 i/100ms Calculating ------------------------------------- json 789.781 (± 2.7%) i/s - 3.978k in 5.041043s ``` ``` require 'json' require 'benchmark/ips' obj = [] 1000.times do |i| obj << { "id" => i, :age => 42, } end Benchmark.ips do |x| x.report "json" do |iter| count = 0 while count < iter JSON.generate(obj) count += 1 end end end ``` https://github.com/flori/json/commit/38c0f6dbe4
2019-10-14[flori/json] Convert Hash object using rb_hash_foreach()Watson
To convert Hash convert, this part was using following pseudo code ``` obj.keys.each do |key| value = obj[key] ... end ``` and `rb_funcall()` was called for `obj.keys`. It might be slightly heavy to call the Ruby method. This patch will iterate to convert Hash object about key/value using `rb_hash_foreach()` Ruby API instead of `rb_funcall()`. ``` $ ruby bench_json_generate.rb Warming up -------------------------------------- json 55.000 i/100ms Calculating ------------------------------------- json 558.501 (± 1.1%) i/s - 2.805k in 5.022986s ``` ``` $ ruby bench_json_generate.rb Warming up -------------------------------------- json 65.000 i/100ms Calculating ------------------------------------- json 659.576 (± 1.5%) i/s - 3.315k in 5.027127s ``` ``` require 'json' require 'benchmark/ips' obj = [] 1000.times do |i| obj << { "id" => i, :age => 42, } end Benchmark.ips do |x| x.report "json" do |iter| count = 0 while count < iter JSON.generate(obj) count += 1 end end end ``` https://github.com/flori/json/commit/a73323dc5e
2019-10-14[flori/json] Fixed unexpected illegal/malformed utf-8 errorNobuyoshi Nakada
flori/json@c34d01ff6a18dac04a90b2e0f820cdb1d5c7e1b2 does not consider US-ASCII compatible but non-UTF-8 encodings, and causes an error in RDoc tests. https://github.com/flori/json/commit/4f471bf590
2019-10-14[flori/json] Convert string encoding to UTF-8 only when neededWatson
## Before ``` $ ruby bench_json_generate.rb Warming up -------------------------------------- json 129.000 i/100ms Calculating ------------------------------------- json 1.300k (± 2.3%) i/s - 6.579k in 5.064656s ``` ## After ``` $ ruby bench_json_generate.rb Warming up -------------------------------------- json 189.000 i/100ms Calculating ------------------------------------- json 1.964k (± 3.3%) i/s - 9.828k in 5.011237s ``` ## Code ``` require 'json' require 'benchmark/ips' obj = [] 1000.times do |i| obj << { "id" => i, :age => 42, } end Benchmark.ips do |x| x.report "json" do |iter| count = 0 while count < iter JSON.generate(obj) count += 1 end end end ``` https://github.com/flori/json/commit/c34d01ff6a
2019-10-14[flori/json] Convert String encoding using `rb_str_encode()`Watson
`rb_funcall` might be slightly heavy to call the Ruby method. This patch will convert String encoding using `rb_str_encode()` instead of `rb_funcall()`. ## Before ``` $ ruby bench_json_generate.rb Warming up -------------------------------------- json 78.000 i/100ms Calculating ------------------------------------- json 789.781 (± 2.7%) i/s - 3.978k in 5.041043s ``` ## After ``` $ ruby bench_json_generate.rb Warming up -------------------------------------- json 129.000 i/100ms Calculating ------------------------------------- json 1.300k (± 2.3%) i/s - 6.579k in 5.064656s ``` ## Code ``` require 'json' require 'benchmark/ips' obj = [] 1000.times do |i| obj << { "id" => i, :age => 42, } end Benchmark.ips do |x| x.report "json" do |iter| count = 0 while count < iter JSON.generate(obj) count += 1 end end end ``` https://github.com/flori/json/commit/9ae6d2969c
2019-10-14[flori/json] Does not check whether illegal utf-8 if string has ascii only.Watson
## Before ``` $ ruby bench_json_generate.rb Warming up -------------------------------------- json 25.000 i/100ms Calculating ------------------------------------- json 250.478 (± 4.8%) i/s - 1.250k in 5.002238s ``` ## After ``` $ ruby bench_json_generate.rb Warming up -------------------------------------- json 32.000 i/100ms Calculating ------------------------------------- json 360.652 (± 3.6%) i/s - 1.824k in 5.064511s ``` ## Test code ``` require 'json' require 'benchmark/ips' obj = [] 1000.times do |i| obj << { :string => "x" * 100, :utf8 => "あ" * 100 } end Benchmark.ips do |x| x.report "json" do |iter| count = 0 while count < iter JSON.generate(obj) count += 1 end end end ``` https://github.com/flori/json/commit/91a24ecac3
2019-10-14[flori/json] Pass args all #to_json in json/add/*.Sho Hashimoto
https://github.com/flori/json/commit/36a7ef6790
2019-10-14[flori/json] Only attempt to resize strings not other objectsFlorian Frank
https://github.com/flori/json/commit/167ada8da7
2019-10-14Fix typos [ci skip]Kazuhiro NISHIYAMA
2019-10-14Suppress warnings for Thread.exclusiveNobuyoshi Nakada
2019-10-14Fixed overflow at onig_region_setNobuyoshi Nakada
To get rid of a bug of `onig_region_set` which takes `int`s instead of `OnigPosition`s, set elements of `beg` and `end` members directly, for the time being.
2019-10-14Fix some DRb issues (#2552)Jeremy Evans
* Handle BasicObject in drb Also fix a bug in rescue clause of any_to_s because sprintf does not handle the %l modifier. Fixes [Bug #7833] * Do not send a reply to the client if there is a connection error This allows for normal TCP shutdown (fin-ack-fin-ack instead of fin-ack-push-rst). Patch from pierre@mouraf.org (Pierre-Alexandre Meyer). Fixes [Bug #2339] * Detect fork and do not reuse forked connections in drb This associates each DRbConn with a pid, and if the pid changes, it closes any DRbConns in the pool with a pid that no longer matches. This fixes DRb servers from sending messages intended for one client to another client after forking. Fixes [Bug #2718] Fixes [Bug #14471]
2019-10-14Import StringScanner 1.0.3 (#2553)Sutou Kouhei
Notes: Merged-By: kou <kou@clear-code.com>
2019-10-13Eliminate the possibility to leave freed ISeqTakashi Kokubun
in active_units Hoping to fix: http://ci.rvm.jp/results/trunk-mjit@silicon-docker/2311375
2019-10-13Delay the free until we stop referring to a unitTakashi Kokubun
`if (unit->iseq)` might have referred to a freed unit. Therefore this commit delays its free.
2019-10-14* 2019-10-14 [ci skip]git
2019-10-13Remove the quick stop path after convert_unit_to_funcTakashi Kokubun
Now I'm not exactly sure why I needed to check `stop_worker_p` after `mjit_copy_cache_from_main_thread` of `convert_unit_to_func` in 4161674b2fbea6bdd01783ac5d3b39d88db22972. If it's for avoiding deadlock under `in_gc` condition, we should keep it. However, if it's not the case and it's just for retrying accidental compilation failure or just to avoid `MJIT_ATOMIC_SET` and `compact_all_jit_code`, I think this quick stop path is not mandatory. Because this path is somewhat problematic in my upcoming fix in mjit_worker, let me try to remove this first and see how CI goes.
2019-10-13Enhance doc for ENV.deleteBurdette Lamar
Notes: Merged: https://github.com/ruby/ruby/pull/2542
2019-10-13* 2019-10-13 [ci skip]git
2019-10-13dir.c (join_path_from_pattern): check NULL from mallocYusuke Endoh
Coverity Scan points out that all the return values of GLOB_ALLOC_N are NULL-checked except this call.
2019-10-13io.c (rb_update_max_fd): fail with a negative file descripterYusuke Endoh
Coverity Scan points out that ext/socket/unixsocket.c may pass -1 to rb_update_max_fd. I'm unsure whether it can happen actually or not, but it would be good for the function to reject a negative value.
2019-10-12re.c (match_set_string): add a check for memory allocationYusuke Endoh
Found by Coverity Scan