aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [rubygems/rubygems] Bump version to 3.1.0.pre2Hiroshi SHIBATA2019-10-151-1/+1
| | | | https://github.com/rubygems/rubygems/commit/a7a673ce22
* [rubygems/rubygems] Also bump test variableHiroshi SHIBATA2019-10-151-1/+1
| | | | https://github.com/rubygems/rubygems/commit/97e9768612
* Remove duplicated `.` [ci skip]Kazuhiro NISHIYAMA2019-10-151-1/+1
|
* Use compare_by_identity hash [Bug #16250]Nobuyoshi Nakada2019-10-151-3/+3
|
* Try to avoid random failureKazuhiro NISHIYAMA2019-10-151-1/+3
| | | | | | | | | | | 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>. ``
* Simplify circular reference check of IRB::ColorTakashi Kokubun2019-10-141-16/+14
|
* IRB colorize: take into account recursive arrays and hashes (#2555)Ary Borenszweig2019-10-142-4/+20
| | | [Bug #16250]
* * 2019-10-15 [ci skip]git2019-10-151-1/+1
|
* Update documentation for File#{readable,writable,executable}{,_real}? [ci skip]Jeremy Evans2019-10-141-1/+19
| | | | | | | | 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]
* add require "monitor"Masatoshi SEKI2019-10-141-0/+1
|
* Automatically close fds on fork (and GC). The connection pools are ↵Masatoshi SEKI2019-10-141-24/+76
| | | | maintained at thread scope.
* [flori/json] fix test as reported in #343Florian Frank2019-10-141-1/+1
| | | | https://github.com/flori/json/commit/565c72ba9e
* [flori/json] Add ascii_only option to JSON::Ext::Generator::State.new.Sho Hashimoto2019-10-141-0/+2
| | | | https://github.com/flori/json/commit/0e99a9aac5
* [flori/json] Add shortcut converting to StringWatson2019-10-141-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* [flori/json] Convert Hash object using rb_hash_foreach()Watson2019-10-141-22/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* [flori/json] Fixed unexpected illegal/malformed utf-8 errorNobuyoshi Nakada2019-10-142-1/+16
| | | | | | | | 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
* [flori/json] Convert string encoding to UTF-8 only when neededWatson2019-10-141-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ## 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
* [flori/json] Convert String encoding using `rb_str_encode()`Watson2019-10-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `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
* [flori/json] Does not check whether illegal utf-8 if string has ascii only.Watson2019-10-141-8/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ## 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
* [flori/json] Pass args all #to_json in json/add/*.Sho Hashimoto2019-10-144-8/+8
| | | | https://github.com/flori/json/commit/36a7ef6790
* [flori/json] Only attempt to resize strings not other objectsFlorian Frank2019-10-142-16/+12
| | | | https://github.com/flori/json/commit/167ada8da7
* Fix typos [ci skip]Kazuhiro NISHIYAMA2019-10-141-4/+4
|
* Suppress warnings for Thread.exclusiveNobuyoshi Nakada2019-10-141-0/+7
|
* Fixed overflow at onig_region_setNobuyoshi Nakada2019-10-141-3/+7
| | | | | | 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.
* Fix some DRb issues (#2552)Jeremy Evans2019-10-143-17/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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]
* Import StringScanner 1.0.3 (#2553)Sutou Kouhei2019-10-147-140/+449
|
* Eliminate the possibility to leave freed ISeqTakashi Kokubun2019-10-131-3/+3
| | | | | | | in active_units Hoping to fix: http://ci.rvm.jp/results/trunk-mjit@silicon-docker/2311375
* Delay the free until we stop referring to a unitTakashi Kokubun2019-10-131-1/+3
| | | | | `if (unit->iseq)` might have referred to a freed unit. Therefore this commit delays its free.
* * 2019-10-14 [ci skip]git2019-10-141-1/+1
|
* Remove the quick stop path after convert_unit_to_funcTakashi Kokubun2019-10-132-10/+0
| | | | | | | | | | | | | | 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.
* Enhance doc for ENV.deleteBurdette Lamar2019-10-131-3/+15
|
* * 2019-10-13 [ci skip]git2019-10-131-1/+1
|
* dir.c (join_path_from_pattern): check NULL from mallocYusuke Endoh2019-10-131-2/+4
| | | | | Coverity Scan points out that all the return values of GLOB_ALLOC_N are NULL-checked except this call.
* io.c (rb_update_max_fd): fail with a negative file descripterYusuke Endoh2019-10-131-1/+1
| | | | | | 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.
* re.c (match_set_string): add a check for memory allocationYusuke Endoh2019-10-121-1/+2
| | | | Found by Coverity Scan
* Also moved fallback definition of __has_attributeNobuyoshi Nakada2019-10-122-4/+4
|
* missing/setproctitle.c: remove nonsense NULL checkYusuke Endoh2019-10-121-3/+2
| | | | | | | | | | If fmt is NULL, ptitle is uninitialized and used. SETPROCTITLE(3bsd) says "If fmt is NULL, the process title is restored", but looks like the feature is not implemented in missing/setproctitle.c. At least the source code of ruby does not pass NULL to the function. So I assume this function requires non-NULL fmt. This issue was found by Coverity Scan.
* Suppress deprecation warnings of MD5 from Xcode 11.1Nobuyoshi Nakada2019-10-121-0/+7
|
* Suppress "clobbered" warnings by gcc 9.2.0Nobuyoshi Nakada2019-10-121-2/+8
|
* Moved RB_METHOD_DEFINITION_DECL to intern.hNobuyoshi Nakada2019-10-123-82/+300
| | | | This macro is used here before defined in ruby.h.
* atime may not updated unless strictatime is set on macOS CatalinaNobuyoshi Nakada2019-10-121-0/+3
| | | | | | | | | | | | | Cited from mount(8): ``` strictatime Always update the file access time when reading from a file. Without this option the filesystem may default to a less strict update mode, where some access time updates are skipped for performance reasons. This option could be ignored if it is not supported by the filesystem. ```
* Import CSV 3.1.2 (#2547)Sutou Kouhei2019-10-1214-445/+580
|
* Use `warn` with `uplevel:` instead of `caller`Kazuhiro NISHIYAMA2019-10-121-1/+1
|
* * 2019-10-12 [ci skip]git2019-10-121-1/+1
|
* Import REXML 3.2.3 (#2548)Sutou Kouhei2019-10-124-1/+13
|
* io.c (NUM2IOCTLREQ): Accept a value more than INT_MAXYusuke Endoh2019-10-111-1/+1
| | | | | | | | ioctl accepts int as request arguments on some platforms, but some requests are more than INT_MAX, e.g., RNDGETENTCNT(0x80045200). Passing (0x80045200 | (-1 << 32)) may work around the issue, but it may not work on a platform where ioctl accepts unsigned long. So this change uses NUM2LONG and then casts it to int.
* test/ruby/test_rubyoptions.rb (test_encoding): skipped on AndroidYusuke Endoh2019-10-111-1/+1
| | | | On Android, nl_langinfo() always returns UTF-8 even when LANG is C.
* test/test_syslog.rb (test_log): skipped on AndroidYusuke Endoh2019-10-111-0/+2
| | | | | On Android 28, LOG_PERROR is defined, but not implemented yet. This change skips Syslog#log explicitly.
* Use `bind_call` instead of `bind` and `call`Kazuhiro NISHIYAMA2019-10-112-2/+2
|
* win32.c: Remove unused calls to StartSockets (#2312)Gabriel Nagy2019-10-111-75/+2
| | | | | | | | NtSocketsInitialized behavior changed in e33b1690, requiring a call to rb_w32_sysinit for starting Windows Sockets. This commit removes NtSocketsInitialized entirely to avoid confusion. Signed-off-by: Gabriel Nagy <gabriel.nagy@puppet.com>