summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-12-20iseq.c (get_insn_info): use binary search instead of linear searchmame
This change introduces get_insn_info_binary_search, which is (should be) equivalent to the old get_insn_info. The old get_insn_info is renamed to get_insn_info_linear_search. When VM_CHECK_MODE > 0, the equivalence is validated at finish_iseq_build. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61353 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-20test/coverage/test_coverage.rb: make the expected value the same as 2.4mame
A follow up of r61350 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61352 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-20Fixed command Injectionnobu
* lib/resolv.rb (Resolv::Config.parse_resolv_conf): fixed potential command injection by use of Kernel#open. [ruby-core:84347] [Bug #14205] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61351 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-20compile.c: add a RUBY_EVENT_COVERAGE_LINE event for line coveragemame
2.5's line coverage measurement was about two times slower than 2.4 because of two reasons; (1) vm_trace uses rb_iseq_event_flags (which takes O(n) currently where n is the length of iseq) to get an event type, and (2) RUBY_EVENT_LINE uses setjmp to call an event hook. This change adds a special event for line coverage, RUBY_EVENT_COVERAGE_LINE, and adds `tracecoverage` instructions where the event occurs in iseq. `tracecoverage` instruction calls an event hook without vm_trace. And, RUBY_EVENT_COVERAGE_LINE is an internal event which does not use setjmp. This change also cancells lineno change due to the deletion of trace instructions [Feature #14104]. So fixes [Bug #14191]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61350 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-20Fixed command Injectionnobu
* resolv.rb (Resolv::Hosts#lazy_initialize): fixed potential command Injection in Hosts::new() by use of Kernel#open. [Fix GH-1777] [ruby-core:84347] [Bug #14205] From: Drigg3r <drigg3r@yandex.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61349 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-20vm_insnhelper.c (vm_trace): fix a typomame
Typical code clone bug. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61348 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-20extend timeout limit.ko1
* test/ruby/test_process.rb (test_threading_works_after_exec_fail): extend timeout limit from 30 to 90 because some test nodes fails with timeout error. Also use a Queue instead of a local variable to communicate with threads. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61347 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-20parse.y: end of script at newlinenobu
* parse.y (parser_yylex): deal with end of script chars just after ignored newline as other places. [ruby-core:84349] [Bug #14206] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61346 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-19skip test_aspawn_too_long_path on Solaris 10 or earlierngoto
* test/ruby/test_process.rb (TestProcess#test_aspawn_too_long_path): skip test_aspawn_too_long_path on Solaris 10 or earlier versions because they lack Process::RLIMIT_NPROC and the test creates extraordinary number of processes that makes the system unstable. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61345 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-19Workaround for optimization bug of Oracle Developer Studio 12.4-12.6ngoto
* pack.c (pack_unpack, AVOID_CC_BUG): Very ugly workaround for optimization bug of Oracle Developer Studio (Oracle Solaris Studio) 12.4, 12.5, and 12.6 on Solaris 10 with -xO4 optimization option. [Bug #11684] [ruby-core:84351] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61344 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-19* 2017-12-20svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61343 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-19Break out of the loop after shutdown in DRbServereregon
* Patch by @seki: https://gist.github.com/seki/ae8bef20238c37c94a91b5461c4bfbdd git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61342 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-19Revert "Improve performance of creating Hash object"watson1978
This reverts commit r61309 Because it was unstable on mswin CI. [ruby-dev:50370][Bug #14203] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61341 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-19Update version number of Psychhsbt
From: SHIBATA Hiroshi <hsbt@ruby-lang.org> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61340 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-19Update RubyGems entry on NEWS file.hsbt
From: SHIBATA Hiroshi <hsbt@ruby-lang.org> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61339 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-19st.c: fix upnobu
* st.c (_st_table_list, _st_table_pool): symbols beginning with an underscore and a lower letter are preserved by the standard. * st.c (get_st_table): protoized. * st.c (st_insert_generic): adjust local variable type to an argument argc. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61338 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-19thread_sync.c: fix rdocnobu
* thread_sync.c (define_thread_class): hide rb_define_class_under from rdoc, so that fake code to teach rdoc takes effect. * thread_sync.c (Init_thread_sync): teach rdoc Mutex. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61337 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-19Merge psych-3.0.2 from ruby/psych.hsbt
It version changed fallback option to keywoad argument on `Yaml.load` method. It break backword compatiblity. see detailed discuttion: https://github.com/ruby/psych/issues/340 From: SHIBATA Hiroshi <hsbt@ruby-lang.org> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61336 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-19error.c: KeyError docs [ci skip]nobu
* error.c (key_err_receiver, key_err_key): [DOC] documents of KeyError methods. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61335 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-19vcs: --add-author-fromnobu
* tool/vcs.rb (VCS::GIT#commit): no --add-author-from option if author equals committer. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61334 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-19Update version of strscan to 1.0.0.hsbt
But we couldn't ship strscan (and stringio) gem. Because rubygems.org still masked them. https://github.com/rubygems/rubygems.org/pull/1696 I'm going to ship them after it deployed. From: SHIBATA Hiroshi <hsbt@ruby-lang.org> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61333 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-19Remove digest.gemspec for default gems.hsbt
It needs to support header file installation and uninstallation. But current RubyGems didn't support it feature yet. From: SHIBATA Hiroshi <hsbt@ruby-lang.org> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61332 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-19compile.c: pop splat resultnobu
* compile.c (compile_array): pop splat result without creating a new hash if the whole hash is popped. [ruby-core:84340] [Bug #14201] From: Nobuyoshi Nakada <nobu@ruby-lang.org> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61331 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-19Improve Array#- efficiency [Fixes GH-1756]nobu
When doing the difference of a small array with a big one it is not efficient in both time and memory to convert the second one to a hash. From: Ana María Martínez Gómez <ammartinez@suse.de> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61330 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-19compile.c: side effect in splatnobu
* compile.c (compile_array): splat which may have side effects should be compiled even if the result will be popped. [ruby-core:84340] [Bug #14201] From: Nobuyoshi Nakada <nobu@ruby-lang.org> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61329 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-18Use syswrite to avoid potential buffering in IO#select speceregon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61327 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-18Support C89 if possiblengoto
* addr2line.c: Because stdbool.h is a C99 feature, compile error occurs with some old compilers without specifying C99 options. Fix compile error with Oracle Solaris Studio 12.4 on Solaris 10. [Bug #14200] [ruby-dev:50366] * missing/stdbool.h: Alternative of stdbool.h for C89 compilers. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61326 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-18* 2017-12-19svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61325 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-18eval_error.c: Fix compile error on Solaris 10ngoto
* eval_error.c (write_warn, write_warn2, write_warn_str): Fix compile error "operands have incompatible types" with Oracle Solaris Studio 12.4 on Solaris 10. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61324 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-18suppress warning: 'const' attribute on function returning 'void'naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61323 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-18webrick 1.4.1 releasenormal
* lib/webrick/version.rb: bump version * lib/webrick/webrick.gemspec: support Ruby 2.3+ [Bug #14189] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61322 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-18test_io.rb: EINVAL on Windowsnobu
* test/ruby/test_io.rb (test_read_command): unusable character causes Errno::EINVAL on Windows. From: Nobuyoshi Nakada <nobu@ruby-lang.org> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61321 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-18io.c: opening external commandnobu
* io.c (rb_io_open_generic): try to open the named file as usual, if klass is not IO nor File, so that Errno::ENOENT will be raised probably. calling on File will be same in the future. From: Nobuyoshi Nakada <nobu@ruby-lang.org> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61320 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-18io.c: open generic in binreadnobu
* io.c (rb_io_s_binread): fix r61317, unintentional change. From: Nobuyoshi Nakada <nobu@ruby-lang.org> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61319 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-18check EOPNOTSUPP.ko1
* test/ruby/test_file.rb (test_open_tempfile_path): skip EOPNOTSUPP (observed on Ubuntu 16 on Docker). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61318 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-18io.c: opening external commandnobu
* io.c (rb_io_open_generic): when external command will be invoked as other than IO singleton method, probably unintentionally, warn if it is File or raise ArgumentError. From: Nobuyoshi Nakada <nobu@ruby-lang.org> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61317 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-18envutil.rb: define flush methodnobu
* test/lib/envutil.rb (verbose_warning): flush is called on STDOUT and STDERR sometimes. From: Nobuyoshi Nakada <nobu@ruby-lang.org> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61316 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-18test/ruby/test_io.rb: test for r61314nobu
From: Nobuyoshi Nakada <nobu@ruby-lang.org> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61315 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-18io.c: open_key_args by rb_io_opennobu
* io.c (open_key_args): open by rb_io_open always also when open_args: option is given. From: Nobuyoshi Nakada <nobu@ruby-lang.org> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61314 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-18iseq.c (finish_iseq_build): fix coverage leakage [Bug #14191]mame
Before this change, coverage.so had failed to measure some multiple-line code fragments. This is because removing trace instructions (#14104) changed TracePoint's lineno (new lineno), and coverage counter array was based on old lineno. This change initializes coverage counter array based on new lineno. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61313 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-18vcs.rb: --add-author-from optionnobu
From: Nobuyoshi Nakada <nobu@ruby-lang.org> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61312 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-18st.c: no C99 commentnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61311 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-18Requiring pp is not required now [ci skip]nobu
- Followup of https://bugs.ruby-lang.org/issues/14123 From: Prathamesh Sonpatki <csonpatki@gmail.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61310 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-18Improve performance of creating Hash objectwatson1978
When generate Hash object, the heap area of st_table will be always allocated in internally and seems it take a time. To improve performance of creating Hash object, this patch will reduce count of allocating heap areas for st_table by reuse them. Performance of creating Hash literal -> 1.53 times faster. [Fix GH-1766] [ruby-core:84008] [Feature #14146] ### Environment * OS : macOS 10.13.1 * CPU : 1.4 GHz Intel Core i7 * Compiler : Apple LLVM version 9.0.0 (clang-900.0.39) ### Before $ ./miniruby -v -I. -I../benchmark-ips/lib ~/tmp/bench/literal.rb ruby 2.5.0dev (2017-11-28 hash 60926) [x86_64-darwin17] Warming up -------------------------------------- Hash literal 51.544k i/100ms Calculating ------------------------------------- Hash literal 869.132k (± 1.1%) i/s - 4.381M in 5.041574s ### After $ ./miniruby -v -I. -I../benchmark-ips/lib ~/tmp/bench/literal.rb ruby 2.5.0dev (2017-11-28 hash 60926) [x86_64-darwin17] Warming up -------------------------------------- Hash literal 63.068k i/100ms Calculating ------------------------------------- Hash literal 1.328M (± 2.3%) i/s - 6.685M in 5.037861s ### Test code require 'benchmark/ips' Benchmark.ips do |x| x.report "Hash literal" do |loop| count = 0 while count < loop hash = {foo: 12, bar: 34, baz: 56} count += 1 end end end git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61309 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-17`BASERUBY` may be not available when building from tarballusa
* common.mk ($(REVISION_H)): revert a part of r61055 because this obstructs building ruby from tarball in clean (no ruby) environment. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61308 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-17* properties.svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61307 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-17* 2017-12-18svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61306 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-17Integer#{any|all|no}_bits: Fix coercion. Add specs [#12753]marcandre
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61305 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-17common.mk: exts-note [ci skip]nobu
* common.mk (exts-note): show notes of non-configured extension libraries. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61304 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-17thread.c: adjusted [ci skip]nobu
* thread.c (timeval_add): adjusted indent and parenthesized in braces. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61303 b2dd03c8-39d4-4d8f-98ff-823fe69b080e