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

41455 Коммитов

Автор SHA1 Сообщение Дата
hsbt a90c99ee0c * Added missing reference of GitHub
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52684 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-20 06:05:35 +00:00
hsbt f0002bd5a2 * lib/net/http.rb: Fixed regression for Net::HTTP::PUT with "Expect-100"
header.
* test/net/http/test_http.rb: added test.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52683 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-20 05:57:10 +00:00
hsbt 2c97d69052 * lib/net/http.rb: set hostname before call ossl_ssl_set_session.
[Bug #11401][ruby-core:70152][fix GH-964] Patch by @mkarnebeek

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52682 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-20 05:40:04 +00:00
nobu 2fac41a63e enc-unicode.rb: --header
* tool/enc-unicode.rb: add --header option to emit name2ctype.h
  directly.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52681 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-20 04:03:10 +00:00
hsbt 65c744fb9c * array.c: clarify docs for take_while/drop_while samples.
[ci skip][fix GH-1028] Patch by @leriksen

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52680 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-20 03:53:25 +00:00
hsbt 35c3f042fc * ext/socket/socket.c: remove mention of :UNIX in getaddrinfo().
It's typically not a support option.
  [ci skip][fix GH-990] Patch by @eam

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52679 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-20 03:48:10 +00:00
hsbt 49bb4a1fd9 * lib/rss/syndication.rb: Add nodoc marker for #validate_sy_updatePeriod.
[ci skip][fix GH-1105] Patch by @davydovanton

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52678 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-20 03:44:12 +00:00
ko1 c267d24ef0 * vm.c (rb_vm_cref_replace_with_duplicated_cref): added.
CREFs should not be shared by methods between `using'.
  [Bug #11247]

* vm_insnhelper.c (vm_cref_replace_with_duplicated_cref): ditto.

* vm.c (vm_cref_dup): should copy refinements correctly.

* eval.c: use rb_vm_cref_replace_with_duplicated_cref().

* eval_intern.h: add a decl. of
  rb_vm_cref_replace_with_duplicated_cref().

* vm_eval.c (eval_string_with_cref): do not need to pass
  scope's CREF because VM can find out CREF from stack frames.

* test/ruby/test_refinement.rb: add a test.




git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52677 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-20 00:17:25 +00:00
svn 895b44dcf6 * properties.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52676 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-19 22:10:29 +00:00
svn c1a461e56a * 2015-11-20
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52675 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-19 22:10:23 +00:00
normal c208841410 add .gitattributes
This improves method detection for Ruby source files;
making output of "git diff" and "git log -p -W" more
readable for git users looking at our Ruby code.

git will automatically notice this file and start using
it when generating diff output.

See the gitattributes(5) manpage for more details.
Ruby pattern definitions reside in userdiff.c of the
git sources at git://git.kernel.org/pub/scm/git/git.git

* .gitattributes: new file for git users
  [ruby-core:71578] [Feature #11713]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52674 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-19 22:09:47 +00:00
akr 33b832979b * ext/socket/ancdata.c: Check buffer full and ignore MSG_TRUNC flag.
buffer fullness is more robust to detect the message is too big for
  the buffer.
  AIX 7.1 recvmsg doesn't set MSG_TRUNC for rflags when MSG_PEEK is
  given.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52673 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-19 13:49:58 +00:00
ko1 121b6e064a * gc.c (gc_start): force to invoke GC by GC.start
even if it is GC.disable'd.

* test/ruby/test_gc.rb: add a test.




git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52672 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-19 12:57:20 +00:00
ko1 d5d997fa11 * gc.c: trivial performance improvements.
name    modified
    vm1_gc_short_lived*                1.015
    vm1_gc_short_with_complex_long*    1.014
    vm1_gc_short_with_long*            1.000
    vm1_gc_short_with_symbol*          1.016
    vm1_gc_wb_ary*                     1.002
    vm1_gc_wb_ary_promoted*            0.996
    vm1_gc_wb_obj*                     1.045
    vm1_gc_wb_obj_promoted*            1.014
    vm3_gc                             1.021

* gc.c (gc_writebarrier_generational): reorder parameters to optimize
  register passing function call.

* gc.c (gc_writebarrier_incremental): ditto.

* gc.c (rb_gc_writebarrier): remove LIKELY().
  LIKELY() seems to move related functions not better places.




git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52671 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-19 11:13:27 +00:00
nobu d32a48ed6c ruby.c: fix ARGV doc [ci skip]
* ruby.c (ruby_prog_init): [DOC] ARGV does not contain the name of
  the executable.  [ruby-core:71561] [Bug #11711]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52670 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-19 10:45:04 +00:00
nobu c1da4ef8d1 ruby.c: feature_option
* ruby.c (feature_option): unify enable_option and disable_option
  not to repeat feature names twice.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52669 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-19 08:56:12 +00:00
ko1 95273072a7 * signal.c: should also clear ruby_disable_gc.
[Bug #11692]




git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52668 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-19 06:54:35 +00:00
ko1 7ae65d0121 * compile.c (iseq_compile_each): T_IMEMO/iseq objects should be
wrap with ISeq wrappers. [Bug #11676]




git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52667 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-19 06:33:05 +00:00
hsbt 5f6715275e * lib/rubygems: Update to RubyGems 2.5.0+ HEAD(c6b4946).
this version includes #1114, #1314, #1322, #1375, #1383, #1387
* test/rubygems: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52666 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-19 06:16:19 +00:00
nobu 9c065a4bfb ruby.c: set compile options at once
* ruby.c (process_options): set instruction compilation options at
  once, and set disabled options to false explicitly.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52665 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-19 05:58:31 +00:00
usa 2e865ba81e * win32/win32.c (finish_overlapped_socket): return value of this
function should be only 0 or SOCKET_ERROR.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52664 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-19 05:16:13 +00:00
nobu 3e8672094d compile.c: tailcall before specialize
* compile.c (iseq_tailcall_optimize): apply tail call optimization
  before conversion to specialized instructions.  when looking
  back from `leave` instruction, `send` instructions have been
  translated already.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52663 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-19 05:12:14 +00:00
usa 01a54cf40f * win32/win32.c (finish_overlapped_socket): ignore EMSGSIZE when input,
because POSIX platforms just do so.  fixes test errors revealed by
  r52647.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52662 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-19 04:59:50 +00:00
nobu 8a3423d38b gc.c: use BUILTIN_TYPE
* gc.c (rb_raw_obj_info): BUILTIN_TYPE works fro non-special_const
  objects.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52660 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-18 23:33:08 +00:00
nobu 3dcd927050 fix typo
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52659 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-18 23:26:47 +00:00
usa 3006e5ea78 * ext/socket/ancdata.c (bsock_recvmsg_internal): stretch the buffer size
only when vmaxdatlen is nil.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52658 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-18 17:53:20 +00:00
akr 1ca597236f * test/socket/test_socket.rb (test_udp_recvmsg_truncation): rflags is
nil on Solaris 10 which have no HAVE_STRUCT_MSGHDR_MSG_CONTROL.
  Reported by Naohisa Goto. [ruby-core:71557] [Bug #11709]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52657 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-18 17:22:34 +00:00
usa f74c229c08 * configure.in: add -static-libgcc for mingw automatically if available.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52656 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-18 16:48:37 +00:00
svn 3c0759555f * 2015-11-19
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52654 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-18 15:55:58 +00:00
usa adbf87232c * ext/extmk.rb (--extflags): new option to pass EXTLDFLAGS to children,
expecially exts.mk.

* common.mk (EXTMK_ARGS): use above option.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52653 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-18 15:55:39 +00:00
ko1 fa3affad9a * vm_method.c (rb_class_clear_method_cache): should clear all
RCLASS_CALLABLE_M_TBLs of all sub-classes (T_ICLASS).

  RCLASS_CALLABLE_M_TBL() caches complemented method entries.
  It should be cleared when the modules are cleared.
  On previous version clears only for direct children.
  It is enough for normal modules because corresponding T_ICLASSes
  are direct children.

  However, refinements create complex data structure. So that
  we need to clear all children (and descendants).
  [ruby-core:71423] [Bug #11672]

* vm_method.c (rb_clear_method_cache_by_class): rb_mKernel
  doesn't call rb_class_clear_method_cache, so that
  clear child T_ICLASSes.

* test/ruby/test_refinement.rb: enable disabled test.




git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52648 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-18 13:59:57 +00:00
akr 1f2b9a46a1 add tests.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52647 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-18 13:19:01 +00:00
ko1 03efb7def9 * vm_method.c (prepare_callable_method_entry): use
RCLASS_CALLABLE_M_TBL() instead of accessing a filed directly.




git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52646 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-18 12:10:07 +00:00
ko1 3f7c0e9fd5 * method.h: introduce the folliwing field and macros.
* rb_method_definition_t::complemented_count to count shared method
    entries because of complemented method entries and separate from
    alias_count.

    Shared `def' only by complemented method entries should not prevent
    method re-definition warning.

  * METHOD_ENTRY_COMPLEMENTED(me) to represent complemented method entry.
  * METHOD_ENTRY_COMPLEMENTED_SET(me) to check it as  complemented me.

* vm_insnhelper.c (aliased_callable_method_entry): should also
  check me->def->complemented_count.

* vm_method.c (method_definition_addref_complement): add to count
  complemented method entries number.

* vm_method.c (rb_method_definition_release): release `def' iff
  alias_count == 0 and complemented_count == 0.

* test/ruby/test_module.rb: add a test.




git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52636 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-18 08:15:51 +00:00
ko1 e2f0af5740 * gc.c (rb_raw_obj_info): fix trivial issues.
* support SPECIAL_CONSTs.
  * fix IMEMO/ment outputs.




git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52635 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-18 08:08:09 +00:00
nobu 40b0dd1ce1 comment for r52633 [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52634 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-18 07:09:27 +00:00
nobu 4a23f0695a compile.c: optimize useless branches
* compile.c (iseq_peephole_optimize): eliminate always/never
  branches after a literal object.  this sequence typically
  appears by defined? operator for a method call on a local
  variable.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52633 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-18 02:32:17 +00:00
nobu e4fc85dfcf compile.c: check type before checking insn_id
* compile.c (iseq_peephole_optimize): check element type before
  checking insn_id which is valid only for INSN elements.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52632 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-18 02:08:17 +00:00
usa d8e1939232 * ext/socket/ancdata.c (bsock_recvmsg_internal): stretch the buffer size
when EMSGSIZE occurs on non HAVE_STRUCT_MSGHDR_MSG_CONTROL platforms
  (such as, Windows).  fixes a test error revealed by r52625.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52631 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-18 01:37:34 +00:00
normal ca5f5871e8 socket: fix typo for default size
* ext/socket/ancdata.c (bsock_recvmsg_internal): use 4096 as
  default size to match pre-r52610, which also maps to a common
  page size.

Oops; absolutely no idea why I made this typo...

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52630 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-18 01:18:30 +00:00
shugo 46425732cf * doc/syntax/refinements.rdoc: update documentation to reflect
recent changes.
  [ci skip] [ruby-core:71466] [Misc #11681] Patch by James Adam

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52629 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-18 01:08:19 +00:00
sonots 9876377040 * test/logger/test_logdevice.rb: Fix tests of logger to make it work on
windows (windows can not remove opened file) [Bug #11702]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52628 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-18 00:53:14 +00:00
nobu 3b91ff89da configure.in: fix help message
* configure.in (ruby-pc): fix help message for --with-ruby-pc
  option.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52627 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-18 00:26:07 +00:00
nobu 54850e4657 configure.in: additional flags
* configure.in: add additional flag variable descriptions, which
  are appended to common flags, e.g., CFLAGS, CPPFLAGS, etc.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52626 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-18 00:25:29 +00:00
normal 508b5fdd52 socket: fix recvmsg without argument
* ext/socket/ancdata.c (bsock_recvmsg_internal): grow buffer
  on unspecified maxdatlen
  [ruby-core:71517] [Bug #11701]
* ext/socket/lib/socket.rb (Socket#recvmsg): nil default for dlen
  (Socket#recvmsg_nonblock): ditto
* test/socket/test_socket.rb (test_recvmsg_udp_no_arg): new test

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52625 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-17 22:00:23 +00:00
svn dd2949a712 * 2015-11-18
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52624 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-17 15:25:34 +00:00
kazu 37509b4eba Logger is Stdlib instead of Core classes
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52623 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-17 15:25:07 +00:00
sonots f8d4793c1b * doc/maintainers.rdoc: Change lib/logger.rb maintainer from nahi to sonots
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52622 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-17 14:16:02 +00:00
sonots 398abe4c51 * lib/logger.rb: support symbol and string log level setting
[fix GH-1101]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52621 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-17 14:15:25 +00:00
sonots f952570bdd lib/logger.rb: Add Logger#reopen
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52620 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-17 13:58:57 +00:00