summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-10-25win32.c: unknown reparse tagsnobu
* win32/win32.c (rb_w32_read_reparse_point): skip unknown reparse tags. [ruby-core:83539] [Bug #14047] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60421 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-25securerandom.rb: fix an example of choose [ci skip]nobu
* lib/securerandom.rb (Random::Formatter#choose): [DOC] fix an example, `n` is not optional. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60420 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-25Update power_assert-1.1.1. It support `test-bundled-gems`.hsbt
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60419 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-25Fixed conflicted variables. v is already used another condition.hsbt
[Misc #14050][ruby-core:83553] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60418 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-25io.c: write a newline togethernobu
* io.c (rb_io_puts): write a newline together at once for each argument. based on the patch by rohitpaulk (Rohit Kuruvilla) at [ruby-core:83508]. [Feature #14042] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60417 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-25range.c: use rb_check_funcallnobu
* range.c (rb_range_values): use rb_check_funcall instead of calling rb_respond_to then rb_funcall, and allow `begin` and `end` to be private as well as other internal conversions. [ruby-core:83541] [Bug #14048] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60416 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-25Added development dependency for power_assert.hsbt
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60415 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-25Update rake-12.2.1 for bundled gems.hsbt
rake-12.2.0 broke Capistrano 3 task. 12.2.1 fixed this regression. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60414 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-25Fix Mock.verify_call to mock_respond_to?nobu
* spec/mspec/lib/mspec/mocks/mock.rb (Mock.verify_call): should pass arguments to as given, not packed in an array. mock_respond_to? expects 2 or 3 arguments. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60413 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-25compile.c: refine error messagesnobu
* compile.c (rb_iseq_compile_node): raise compile error with exact iseq type name. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60412 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-25range.c: check if exclude_end? is definednobu
* range.c (rb_range_values): should raise TypeError if necessary method is not defined, not NoMethodError, when trying to tell if the object is a Range and extract info. [ruby-core:83541] [Bug #14048] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60411 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-25Update latest bundled_gems.hsbt
* rake-12.2.0 * test-unit-3.2.6 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60410 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-25debug.c: RSymbol infonobu
* debug.c (ruby_dummy_gdb_enums): force to include struct RSymbol info. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60409 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-24file.c: fix possible alignment bugs in r60386normal
* file.c (struct apply_filename): split out from struct apply_arg * file.c (apply2files): use offsetof for flex array size calculation * file.c (apply2files): avoid redundant marking with ALLOCV [ruby-core:83535] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60408 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-24debug.c: imemo_masknobu
* .gdbinit (rp, rp_imemo, rb_ps_thread): update imemo_mask. * debug.c (ruby_dummy_gdb_enums): include imemo_types. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60407 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-24lib/ostruct.rb: Use frozen literals.marcandre
Patch adapted from Espartaco Palma. [GH-1714] [Bug #14000] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60406 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-24* 2017-10-25svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60405 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-24lib/weakref: Remove incorrect example [DOC] [Bug #14031]marcandre
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60404 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-24add NEWS entry about [Feature #14045]ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60403 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-24sysconfdir on Windowsnobu
* ext/etc/etc.c (etc_sysconfdir): mentioned special case on Windows. [ruby-core:43110] [Bug #6121] * ext/etc/extconf.rb: define SYSCONFDIR only if sysconfdir is set in RbConfig::CONFIG and not empty. * win32/Makefile.sub (config.status): sysconfdir is not used on Windows. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60402 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-24Update call-seq of ARGF.read_nonblockkazu
ARGF.read_nonblock supports `exception: false' like IO#read_nonblock since 2.3.0. [Feature #11358] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60401 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-24Test for r60396nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60400 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-24Revert "sysconfdir on Windows"naruse
This reverts commit r60279. This breaks mswin build: https://ci.appveyor.com/project/ruby/ruby/build/1.0.5571 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60399 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-24* remove trailing spaces.svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60398 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-24Lazy Proc allocation for block parametersko1
[Feature #14045] * insns.def (getblockparam, setblockparam): add special access instructions for block parameters. getblockparam checks VM_FRAME_FLAG_MODIFIED_BLOCK_PARAM and if it is not set this instruction creates a Proc object from a given blcok and set VM_FRAME_FLAG_MODIFIED_BLOCK_PARAM. setblockparam is similar to setlocal, but set VM_FRAME_FLAG_MODIFIED_BLOCK_PARAM. * compile.c: use get/setblockparm instead get/setlocal instructions. Note that they are used for method local block parameters (def m(&b)), not for block local method parameters (iter{|&b|). * proc.c (get_local_variable_ptr): creates Proc object for Binding#local_variable_get/set. * safe.c (safe_setter): we need to create Proc objects for postponed block parameters when $SAFE is changed. * vm_args.c (args_setup_block_parameter): used only for block local blcok parameters. * vm_args.c (vm_caller_setup_arg_block): if called with VM_CALL_ARGS_BLOCKARG_BLOCKPARAM flag then passed block values should be a block handler. * test/ruby/test_optimization.rb: add tests. * benchmark/bm_vm1_blockparam*: added. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60397 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-24ruby.c: fix r60393nobu
* ruby.c (load_file_internal): set loop options after parsing shebang line. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60396 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-24vm_eval.c: all value type casesnobu
* vm_eval.c (rb_type_str): ensure all value types are covered. missed types would be warned by -Wswitch option of gcc. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60395 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-24Removed NODE_OPT_Nnobu
* node.h (NODE_OPT_N): removed. * parse.y (parser_append_options): expand -n option loop to while gets loop. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60394 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-24parse.y: rb_parser_set_optionsnobu
* parse.y (yycompile0): append top-level addenda before appending prelude nodes. * parse.y (rb_parser_set_options): set top-level addendum options before parsing. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60393 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-24vm_eval.c: uncallable_objectnobu
* vm_eval.c (uncallable_object): extract error case as a no-return function. split successive ?-marks not to get confused with a trigraph. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60392 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-24Avoid many type castsmame
The idiom `rb_gc_force_recycle((VALUE)...)` was used heavily. This change defines `rb_discard_nod(NODE*)` and allows C compiler to typecheck. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60391 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-24Remove dynamic NODE allocation out of parsermame
A temporary NODE object was allocated to create iseq. Instead, this patch allocates a dummy NODE as auto variable, and discard it soon. This change is intended as a preparation to manage AST NODEs out of GC. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60390 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-24Remove special handling for (NODE*)1mame
The magic number was used to mark NODE_ATTRASGN when its receiver is self. But the hack was refactored at r46366. So the remaining code fragments are no longer needed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60389 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-24net/http: use require_relative to reduce syscallsnormal
require_relative speeds up loading of files by reducing path lookups. On a clean install with RubyGems-enabled, "ruby -rnet/http -e exit" shows a reduction in failed open(2) syscalls from 410 to 350 (x86-64 GNU/Linux). I could not measure a time difference on my Linux-based machines, however this should be noticeable to users of other kernels with worse syscall and VFS performance than Linux. Further use of require_relative will reduce lookups in other places. * lib/net/http.rb: use require_relative [ruby-core:78285] [Feature #12973] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60388 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-24* properties.svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60387 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-24file.c: apply2files releases GVLnormal
This means File.chmod, File.lchmod, File.chown, File.lchown, File.unlink, and File.utime operations on slow filesystems no longer hold up other threads. The platform-specific utime_failed changes is compile-tested using a new UTIME_EINVAL macro This hurts performance on fast filesystem, but these methods are unlikely to be performance bottlenecks and (IMHO) avoiding pathological slowdowns and stalls are more important. benchmark results: minimum results in each 3 measurements. Execution time (sec) name trunk built file_chmod 0.591 0.801 Speedup ratio: compare with the result of `trunk' (greater is better) name built file_chmod 0.737 * file.c (UTIME_EINVAL): new macro to ease compile-testing * file.c (struct apply_arg): new struct * file.c (no_gvl_apply2files): new function * file.c (apply2files): release GVL * file.c (chmod_internal): adjust for apply2files changes * file.c (lchmod_internal): ditto * file.c (chown_internal): ditto * file.c (lchown_internal): ditto * file.c (utime_failed): ditto * file.c (utime_internal): ditto * file.c (unlink_internal): ditto [ruby-core:83200] [Feature #13996] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60386 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-23* 2017-10-24svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60385 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-23thread_pthread: do not corrupt stacknormal
This fixes stuck test/ruby/test_io.rb with FIBER_USE_NATIVE=0 on GNU/Linux because linked-list pointers used by glibc get corrupted when fiber stacks are copied. Thanks to wanabe for finding the bug and original patch. * thread_pthread (native_thread_init_stack): fix stack corruption [ruby-core:82737] [Bug #13387] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60384 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-23multiple arguments to writenobu
Make write methods of IO-like objects accept multiple arguments, as well as IO#write. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60383 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-23Add test cases for branch coverageyui-knk
* test/coverage/test_coverage.rb (test_branch_coverage_for_while_statement): Add test cases for modifier while/until. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60382 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-23Fix a typo [ci skip]kazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60381 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-23OpenSSL may show the different error messagenaruse
https://github.com/ruby/ruby/commit/d02211c9da608742b09aec768db79442007eabc0#commitcomment-25119729 From: MSP-Greg <MSP-Greg@users.noreply.github.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60380 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-23zlib.c: multiple arguments to writenobu
* ext/zlib/zlib.c (rb_gzwriter_write): accepts multiple arguments. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60379 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-23error.c: warning to write multiple argumentsnobu
* error.c (warning_write): accepts multiple arguments to merge multiple warning messages. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60378 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-23stringio.c: write multiple argumentsnobu
* ext/stringio/stringio.c (strio_write_m): make StringIO#write accept multiple arguments, as well as IO#write. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60377 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-23NEWS: add [Feature #9323] [ci skip]nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60376 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-23Removed empty dir.hsbt
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60375 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-23Drop to support NaCl platform.hsbt
Because NaCl and PNaCl are already sunset status. see https://bugs.chromium.org/p/chromium/issues/detail?id=239656#c160 configure.ac: Patch for this file was provided by @nobu. [Feature #14041][ruby-core:83497][fix GH-1726] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60374 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-23io.c: fix infinite retrynobu
* io.c (io_binwritev): fix infinite retry when flushing buffered data. [Feature #9323] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60373 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-23io.c: fix buffered outputnobu
* io.c (io_binwritev): append to buffered data, not overwriting. [Feature #9323] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60372 b2dd03c8-39d4-4d8f-98ff-823fe69b080e