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

40838 Коммитов

Автор SHA1 Сообщение Дата
nobu 2fda4a5568 proc.c: merge blocks
* proc.c (proc_binding): merge blocks in same condition.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52137 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-15 16:06:52 +00:00
svn 59d0dfcae0 * 2015-10-16
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52136 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-15 15:54:57 +00:00
nobu beeaef3d32 proc.c: refine ifunc checks
* proc.c (IS_METHOD_PROC_IFUNC): separate from IS_METHOD_PROC_ISEQ
  for vm_ifunc.

* proc.c (rb_proc_get_iseq): use RUBY_VM_IFUNC_P to see if iseq is
  an ifunc.

* proc.c (rb_proc_get_iseq, proc_binding): reduce redundant checsk
  by IS_METHOD_PROC_IFUNC.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52135 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-15 15:54:48 +00:00
nobu 14b8530454 proc.c: void env
* proc.c (rb_sym_to_proc): make void env.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52134 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-15 14:56:05 +00:00
kazu 4951f3b5e3 fix typos [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52133 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-15 14:37:02 +00:00
nobu 278ca4dbe8 vm_dump.c: unused variable
* vm_dump.c (vm_stack_dump_each): remove never-used variable and
  dead code for it.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52132 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-15 06:51:17 +00:00
nobu 1bcc7ebda2 proc.c: iseq conditions
* proc.c (rb_block_min_max_arity, rb_mod_define_method): use
  RUBY_VM_NORMAL_ISEQ_P() to check if iseq.

* proc.c (make_curry_proc): IS_METHOD_PROC_ISEQ() includes
  RUBY_VM_IFUNC_P().

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52131 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-15 06:34:31 +00:00
nobu 7c4b03e775 vm.c: simplify
* vm.c (env_mark): remove redundant conditions and mark block.iseq
  simply unless null.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52130 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-15 04:44:58 +00:00
nobu c2e8fb0f34 proc.c: proc without env
* proc.c (rb_sym_to_proc): move from string.c and create a Proc
  with no environments.  [ruby-core:71088] [Bug #11594]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52129 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-15 04:37:26 +00:00
nagachika d0e8610582 * test/objspace/test_objspace.rb
(test_trace_object_allocations_start_stop_clear): clear object
  allocation table first to get rid of erronous detection for obj3.
  [ruby-dev:49095] [Bug #11271]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52128 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-14 17:02:56 +00:00
svn 852acc92db * 2015-10-15
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52127 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-14 16:58:40 +00:00
eregon 5389661931 * test/ostruct/test_ostruct.rb: Add tests for OpenStruct#respond_to.
Patch by @jeremy in [GH-1041]: https://github.com/ruby/ruby/pull/1041

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52126 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-14 16:57:46 +00:00
eregon 3bf9b2f047 * lib/ostruct.rb: Finish defining OpenStruct attributes lazily.
Patch by @sferik in [GH-1037]: https://github.com/ruby/ruby/pull/1037
  This commit is an addendum to https://github.com/ruby/ruby/pull/1033.
  It:
  1. lazily defines attribute accessors for copied and marshaled objects,
  2. returns nil when an attribute reader is not defined, and
  3. defines respond_to_missing? to maintain the same respond_to? behavior

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52125 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-14 16:57:21 +00:00
nobu 5c7f36a1b8 configure.in: libunwind.h check
* configure.in: check for libunwind.h, which is not available in
  very old OS X SDK.  [ruby-core:71080] [Bug #11591]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52124 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-14 07:56:53 +00:00
nobu 4200ddd5d0 iseq.c: list of keywords [Fix GH-1056]
* iseq.c (rb_insn_operand_intern): change kw in callinfo disasm from the
  number of keyword arguments to an ordered list of the keywords used.
  [Feature #11589]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52123 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-14 05:11:44 +00:00
nobu e21f1875b7 parse.y: fix ripper warnings
* parse.y (parser_nextc): send a warning to ripper, not to STDERR
  always.
* parse.y (rb_warn1, rb_warning1): move argument conversions to
  callers.  PRIsVALUE is not valid in String#%.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52122 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-14 04:58:47 +00:00
svn 049c9fecd8 * 2015-10-14
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52121 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-14 04:37:47 +00:00
hsbt c4ccdd6471 * lib/racc/rdoc/grammar.en.rdoc: fix spell error.
[fix GH-1053][ci skip] Patch by @Matrixbirds

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52120 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-14 04:37:31 +00:00
akr e794fa5cb5 * ext/socket/raddrinfo.c (rsock_fd_family): Check sa_len.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52119 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-13 13:49:58 +00:00
svn 33f3789e85 * 2015-10-13
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52118 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-13 03:14:45 +00:00
nobu 61053459cf rsock_addrinfo: specify address family
* ext/socket/rsock_addrinfo (rsock_addrinfo): specify address
  family.  [Fix GH-1052]
* ext/socket/udpsocket.c (udp_connect, udp_bind, udp_send):
  address family by the receiver.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52117 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-13 03:14:13 +00:00
nobu 18e4a39c9a node.c: update comment
* node.c (dump_node): update comment for OP_ASGN2 and fix unused
  field.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52116 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-12 03:39:23 +00:00
nobu b0e372a867 parse.y: move ripper_id2sym
* parse.y (new_attr_op_assign): move ripper_id2sym from each
  rules.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52115 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-12 03:26:24 +00:00
nobu 14e606ae53 node.c: no attrset ID in NODE
* node.c (dump_node): attrset ID is no longer in NODE_OP_ASGN2.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52114 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-12 03:03:36 +00:00
nobu 14059af326 node.h: no attrset ID in NODE
* compile.c (iseq_compile_each), node.h (NEW_OP_ASGN22): attrset
  ID no longer needs to be stored in a NODE, create at byte code
  generation.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52113 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-12 02:48:37 +00:00
nobu 324d7c8995 udpsocket.c: free addrinfo
* ext/socket/udpsocket.c (udp_send): ensure addrinfo gets freed.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52112 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-12 00:11:54 +00:00
nobu 3cf04aceec udpsocket.c: check once first
* ext/socket/udpsocket.c (udp_connect, udp_bind): check if the
  socket is opened once before retreiving address infos.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52111 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-12 00:11:37 +00:00
svn 2ddb885863 * 2015-10-12
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52110 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-12 00:09:03 +00:00
nobu e0c038cdfb numeric.c: use predefined IDs
* numeric.c: use predefined IDs and prepared IDs.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52109 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-12 00:08:58 +00:00
nobu 5f0d9e8644 numeric.c: common expressions
* numeric.c (flo_pow): extract common expressions.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52108 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-12 00:08:44 +00:00
ko1 930595cd35 * vm_insnhelper.c (vm_push_frame): initialize other than sp (and ep)
first for performance.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52107 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-10 22:15:18 +00:00
ko1 0a40bcb20b * vm_eval.c, internal.h (rb_yield_1): added for performance which
doesn't check Qundef.
* numeric.c (int_dotimes): use rb_yield_1.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52106 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-10 21:22:54 +00:00
ko1 ad45aea456 * vm_insnhelper.c (vm_call_iseq_setup_normal): setup sp first
for performance.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52105 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-10 21:20:59 +00:00
ko1 cb223b7533 * vm.c (invoke_block_from_c): split this function into several
functions.
* vm_insnhelper.c (vm_yield_callee_setup_arg): remove this function
  beacuse it is only delegation function.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52104 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-10 20:32:07 +00:00
svn d8736ecff2 * 2015-10-11
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52103 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-10 18:49:23 +00:00
ko1 f6e57af98d * gc.c (newobj_of_slowpass): fix typo (pass -> path).
Pointed out by Yukihiro Matsumoto  <matz@ruby-lang.org>.
* gc.c (newobj_of_...): `of' is unnecessary.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52102 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-10 18:49:05 +00:00
nobu d9ac64fdc7 udpsocket.c: refix r52097
* ext/socket/udpsocket.c (udp_connect, udp_bind): get open files
  inside ensure functions.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52101 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-10 10:04:44 +00:00
ko1 a00fc76ce5 * vm_insnhelper.c (vm_call_method0): do not propagate enable_fastpath,
but pass dummy CC to prevent wrong caching.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52100 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-10 09:36:10 +00:00
ko1 e8ba0b7b04 * import a github pull request
https://github.com/ruby/ruby/pull/1050
  by Kazuho Oku <kazuho@natadeco.co>.
  This pull request has the following commits.
* gc.c: reduce # of args to 6 (max. of register args on x86-64) so
  that the `newobj_of_slowpass` can be called via TCO.
* gc.c (newobj_of), string.c (str_duplicate): for performance,
  the hot functions must be inlined.
* gc.c: for performance, preceding arguments of `.*newobj_of.*`
  must be same, so that the arg registers can be reused in case of
  TCO.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52099 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-10 06:34:24 +00:00
svn 1331f80a1e * 2015-10-10
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52098 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-09 23:52:34 +00:00
nobu 38e6235235 udpsocket.c: memory leaks
* ext/socket/udpsocket.c (udp_connect, udp_bind, udp_send): fix
  memory leaks at closed socket.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52097 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-09 23:52:23 +00:00
nobu 24e5e37410 common.mk: separate test-testframework
* common.mk (check): separate test-testframework from test-all
  only when building check.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52096 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-09 13:54:43 +00:00
shugo 3e70f44ae9 * lib/net/ftp.rb (parse257): refactor.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52095 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-09 08:29:36 +00:00
svn 29e9230bc5 * remove trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52094 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-09 07:42:43 +00:00
shugo 5a0f41a588 * lib/net/imap.rb: use frozen_string_literal: true.
* test/net/imap/test_imap.rb: ditto.

* test/net/imap/test_imap_response_parser.rb: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52093 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-09 07:42:34 +00:00
shugo ae6555aa25 * lib/net/ftp.rb: use frozen_string_literal: true.
* test/net/ftp/test_buffered_socket.rb: ditto.

* test/net/ftp/test_ftp.rb: ditto.

* test/net/ftp/test_mlsx_entry.rb: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52092 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-09 07:28:10 +00:00
nobu d8d51b6708 node.c: fix comments [ci skip]
* node.c (dump_node): fix comments of dynamic string literals,
  nd_next->nd_head is the interpolation but not a literal string.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52091 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-09 06:44:22 +00:00
svn e0e39446e3 * remove trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52090 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-09 05:21:01 +00:00
sorah e2d79c46c8 * ext/openssl/lib/openssl/ssl.rb: Revert r52082 because it was
dropping TLS v1.1 support too. Supporting only TLS v1.2 is too
  early, because many popular websites still don't support it.

  For instance, Servers where aws-sdk connects to still don't support
  TLS v1.2 and it became broken.

  We should consider more carefully about this.

  [Fix GH-873] [Feature #11524]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52089 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-09 05:20:50 +00:00
nobu 865c666fbb test_iseq.rb: fix meaningless assertion
* test/ruby/test_iseq.rb (test_frozen_string_literal_compile_option):
  fix meaningless assertion.  object_id of same object is always
  same.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52088 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-09 04:15:53 +00:00