Граф коммитов

47227 Коммитов

Автор SHA1 Сообщение Дата
nobu 1ebd2b3702 ruby.h: NULL as empty array
* include/ruby/ruby.h (rb_yield_values, rb_funcall): call with
  NULL when no arguments, for clang which defines static array
  when an empty array is used.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59483 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-08-03 08:09:24 +00:00
nobu 2d3c331510 extract IDs
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59482 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-08-03 07:08:00 +00:00
nobu 76857f8ee8 dir.c: reduce syscalls
* dir.c (glob_helper): utilize d_type even if no recursive
  pattern, to reduce stat/lstat syscalls in subsequent
  glob_helper.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59481 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-08-03 04:13:12 +00:00
nobu 2a5c20acaf fix typo in help [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59480 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-08-03 03:41:50 +00:00
nobu 1ef613dd0b dir.c: relative path Dir base
* dir.c (glob_helper): fix globbing based on a relative path Dir.
  [Feature #13056]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59479 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-08-03 03:39:33 +00:00
usa 6c676acfa2 Should show the entity of $PATH_SEPARATOR
* win32/configure.bat (--help): should show the entity of $PATH_SEPARATOR.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59478 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-08-03 03:31:38 +00:00
usa 3bec82c728 Mention about `--with-opt-dir`
* win32/configure.bat (--help): mention about `--with-opt-dir`.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59477 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-08-03 03:25:46 +00:00
nobu 83a31e9e90 dir.c: relax base option
* dir.c (dir_glob_options): relax base option.  ignore when nil
  or an empty string as :base option.  [Feature #13056]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59476 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-08-03 02:14:51 +00:00
nobu 432e6805e1 spec_helper.rb: pass jobserver fds
* spec/rubyspec/optional/capi/spec_helper.rb (compile_extension):
  pass jobserver fds explicitly, because other specs might have
  set close_on_exec flags on these fds.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59475 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-08-03 00:53:25 +00:00
ko1 46085e913a fix stack storing for root fibers.
* cont.c (root_fiber_alloc): this function is called by fiber_current()
  and fiber_store(). fiber_current() should clear VM stack information
  in a fiber data because runnning thread knows stack information and has
  responsibility to manage it. However fiber_store() requires to remain
  VM stack information in a fiber data because the responsibility to manage
  VM stack is moved to the Fiber from the Thread (and switch to another
  fiber).

* cont.c (root_fiber_alloc): save thread's fiber and root_fiber information.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59474 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-08-02 21:48:51 +00:00
kazu a2078e7c54 Fix URI::FTP.build code example typo
ref https://github.com/rurema/doctree/pull/462
[ci skip]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59473 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-08-02 15:10:43 +00:00
kazu c8247a6b47 Fix variable name in example of net/pop
[ci skip]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59472 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-08-02 15:10:42 +00:00
kazu b93aea84d0 Fix net/pop code example syntax error
ref https://github.com/rurema/doctree/pull/455
[ci skip]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59471 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-08-02 15:10:40 +00:00
svn 58cef45088 * 2017-08-03
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59470 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-08-02 15:10:39 +00:00
kazu 42fbe19fa8 Fix cgi/core code example missing comma
ref https://github.com/rurema/doctree/pull/448
[ci skip]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59469 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-08-02 15:10:38 +00:00
yugui bc5d11bc03 Port more commands from .gdbinit to lldb
* misc/lldb_cury.py (dump_node, SDR, rb_count_objects): added

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59468 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-08-02 05:27:25 +00:00
nobu 8238987903 suppress warnings when RUBY_USE_SETJMPEX
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59467 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-08-02 03:02:22 +00:00
nobu 5ba4d948ff eval.c: suppress warnings
* eval.c (exc_setup_message): setup exception message as an
  exception instance, and a cause from a previous exception.
  split from setup_exception to suppress a warning when
  RUBY_USE_SETJMPEX is enabled.

* eval.c (setup_exception): make state volatile to suppress a
  warning too.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59466 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-08-02 02:40:29 +00:00
knu 71d16ad5aa ipaddr is now a default gem with an upstream at: https://github.com/ruby/ipaddr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59465 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-08-02 02:20:48 +00:00
hsbt 8397de0091 Partly reverted email notification on travis configuration.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59464 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-08-02 02:19:04 +00:00
nobu a2fcfba534 eval.c: fix state type
* eval.c (setup_exception): state is a raised thread flag, not for
  EXEC_TAG.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59463 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-08-02 00:54:13 +00:00
ko1 92f7813ae2 release VM stack properly.
* cont.c: r55766 change the handling method of Fiber's VM stack.
  Resumed Fiber points NULL as VM stack and running Thread has
  responsibility to manage it (marking and releasing).

  However, thread_start_func_2()@thread.c and thread_free()@vm.c
  doesn't free the VM stack if corresponding root Fiber is exist.
  This causes memory leak. [Bug #13772]

* cont.c (root_fiber_alloc): fib->cont.saved_thread.ec.stack should be NULL
  because running thread has responsibility to manage this stack.

* vm.c (rb_thread_recycle_stack_release): assert given stack is not NULL
  (callers should care it).


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59462 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-08-02 00:50:42 +00:00
svn b7f205d54c * 2017-08-02
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59461 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-08-02 00:20:42 +00:00
kazu 3ba550c19b Remove "make update-rubyspec"
because it is no-op for compatibility

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59460 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-08-02 00:20:41 +00:00
nobu ae6625c546 assertions.rb: AllFailures#message encoding
* test/lib/test/unit/assertions.rb (AllFailures#message): put
  indented messages back to the original encoding, to get rid of
  Encoding::CompatibilityError when key has non-ASCII characters.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59459 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-08-01 11:59:45 +00:00
nobu 4eafec5ea6 parse.y: simplify parse_ident
* parse.y (parse_ident): simplified selecting identifier types by
  the suffix.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59458 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-08-01 08:32:18 +00:00
ko1 fb29a4dcda should not copy promoted flags.
* include/ruby/ruby.h (rb_clone_setup): should not copy some flags
  (FL_PROMOTED0|FL_PROMOTED1|FL_FINALIZE).
  [Bug #13775]

* test/ruby/test_object.rb: add a test (note that this test will fail
  only when RGENGC_CHECK_MODE >= 2).


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59457 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-08-01 02:10:19 +00:00
svn 66cc7e043b * 2017-08-01
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59456 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-08-01 00:19:10 +00:00
kazu 53b88cc66c Use `&.` instead of modifier if
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59455 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-08-01 00:19:10 +00:00
nobu bf87195ea3 configure.in: use libtool
* configure.in: use libtool on macOS to suppress a warning against
  debug_counter.o, which has no symbols unless USE_DEBUG_COUNTER
  is set to non-zero.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59454 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-31 04:04:10 +00:00
svn 2fa38c5913 * 2017-07-31
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59453 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-31 03:35:23 +00:00
kazu d9d2bbe4b9 Improve error message
ref [Bug #13761]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59452 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-31 03:35:22 +00:00
nobu 84d83482c8 UNALIGNED_MEMBER_ACCESS only for clang
* eval_intern.h (UNALIGNED_MEMBER_ACCESS): enable only on clang.
  gcc does not complain about pointers to member of unaligned
  struct.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59451 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-30 14:59:40 +00:00
nobu 2b582b7ca6 UNALIGNED_MEMBER_ACCESS
* eval_intern.h (UNALIGNED_MEMBER_ACCESS): suppress
  address-of-packed-member warnings by clang 4.0.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59450 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-30 14:48:45 +00:00
nobu f9d5843fd9 hash.c: refactor env_enc_str_new
* hash.c (env_enc_str_new): convert to the expected encoding
  without intermediate string, and set econv flags if default
  internal encoding is set too.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59449 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-30 02:56:30 +00:00
nobu 8458e709ab string.c: rb_str_initialize
* string.c (rb_str_initialize): new function to (re)initialize a
  string with data and encoding.  extracted from
  rb_external_str_new_with_enc.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59448 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-30 02:56:29 +00:00
svn c3c215e28a * 2017-07-30
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59447 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-30 00:40:44 +00:00
nobu 44544c036c compile.c: replace adjuststack
* compile.c (iseq_set_sequence): replace adjuststack with pop, or
  remove if possible instead of two nops.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59446 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-30 00:40:43 +00:00
nobu 3449d4fa2d visibility of inherited method
* vm_insnhelper.c (vm_call_method_each_type): honor the original
  visibility of inherited methods when a refinement is defined but
  not activated.  [ruby-core:82209] [Bug #13776]

Author:    Mon_Ouie (Mon ouïe) <mon.ouie@gmail.com>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59445 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-29 12:42:42 +00:00
nobu 97c977debf adjust indent [ci skip]
* vm_insnhelper.c (vm_call_method_each_type): adjust indent of a
  block in switch.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59444 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-29 12:42:41 +00:00
nobu 4905a62f5b file.c: [DOC] File.mkfifo
* file.c (rb_file_s_mkfifo): enclose rdoc by ifdef so it will be
  generated properly.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59443 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-29 12:11:51 +00:00
nobu c1d5d16c38 compile.c: fix flip-flop value
* compile.c (iseq_compile_each0): as compile_flip_flop always ends
  with a jump instruction, successive instruction is never reached,
  but caused stack consistency error without peephole optimization.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59442 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-29 02:03:11 +00:00
svn ab6631e0ad * 2017-07-29
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59441 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-28 16:47:51 +00:00
odaira 3215b27a9a Include sys/select.h when checking HAVE_RB_FD_INIT
* configure.in: include sys/select.h for fd_mask on AIX
  [Feature #13637]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59440 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-28 16:47:50 +00:00
kou cff3941b81 rexml: Remove needless document
[Fix GH-1671]

Patch by madblobfish. Thanks!!!


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59439 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-28 14:16:17 +00:00
svn 0607ccc270 * 2017-07-28
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59438 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-28 07:46:21 +00:00
glass 32eeff1708 csv.rb: fix incompatibility introduced in r59428
* lib/csv.rb: fix incompatibility introduced in r59428.
              CSV.new takes options as keyword arguments.

* test/csv/test_features.rb: add a test to ensure it raises error againt
                             unknown options

* test/csv/test_features.rb: add a test to ensure row_sep option is properly
                             applied

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59437 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-28 07:46:20 +00:00
nobu b89d5938b5 set auto-props to avoid commits setting properties
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59436 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-27 12:54:55 +00:00
nobu c6134d19dc fix type
* spec/rubyspec/optional/capi/ext/io_spec.c (io_spec_rb_io_wait_readable):
  fix type of read(2).

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59435 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-27 12:25:42 +00:00
nobu 083a25f903 vm_core.h: shrink trap_list size
* vm_core.h (rb_vm_struct): separate trap_list cmd and safe to
  each arrays, to shrink the size.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59434 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-27 12:17:56 +00:00