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

37572 Коммитов

Автор SHA1 Сообщение Дата
hsbt 91dd80fac7 * lib/open3.rb: fix code formatting in documentation by @JoshCheek
[fix GH-747][ci skip]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48257 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-04 03:09:28 +00:00
svn 478e1b04df * 2014-11-04
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48256 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-03 23:58:44 +00:00
normal 5eaa746613 encoding.c (enc_memsize): remove unnecessary function
Trims our binary size slightly (numbers from x86-64):

       text    data     bss     dec     hex filename
    2795184   22766   72024 2889974  2c18f6 ruby.before
    2795112   22766   72024 2889902  2c18ae ruby.after

[ruby-core:65304]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48255 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-03 23:58:32 +00:00
akr 5998b9d68f * test/openssl/utils.rb: The default of :ignore_listener_error is
changed to false.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48254 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-03 09:10:28 +00:00
nobu 97c1f8cace README.EXT, README.EXT.ja: mention about PRIsVALUE [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48253 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-03 07:12:37 +00:00
nobu e3787f8b36 ext/tk/tkutil/tkutil.c: disable untyped data warnings
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48252 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-03 06:22:16 +00:00
ko1 86e9a1c005 * iseq.c (iseq_free): resolve memory leak.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48251 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-03 05:43:31 +00:00
nobu 30f69beeba tkutil.c: inherit Data
* ext/tk/tkutil/tkutil.c: use Data as super class, not to inherit
  useless methods.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48250 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-03 05:36:29 +00:00
nobu 2320264ef6 foreach.c: printf specifier
* ext/-test-/st/foreach/foreach.c: get rid of hard coded "%lu",
  since st_data_t depends on the platforms.  use PRIuVALUE with
  casting VALUE instead since there is no specifier for it.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48249 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-03 05:36:18 +00:00
ko1 af97388bc4 * iseq.c (iseq_memsize): catch up recent changes.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48248 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-03 04:54:27 +00:00
ko1 ef25be7391 * vm_core.h: change semantics of opt_num and opt_table.
`opt_num' was the number of optional parameters + 1.
  `opt_table' has "opt_num" entries.
  Change them to:
  `opt_num' is the number of optional parameters.
  `opt_talbe' has "opt_num + 1" entries.
  This change simplify parameter fitting logics.
* compile.c: catch up this change.
* iseq.c: ditto.
* proc.c: ditto.
* vm_args.c: ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48247 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-03 04:43:07 +00:00
hsbt 888e16c51e * NEWS: added period into Matrix section. [ci skip]
[misc #10446][ruby-core:65987]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48246 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-03 02:47:49 +00:00
hsbt eb3c563fa6 * vm_args.c: fixed build error with clang
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48245 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-03 00:43:39 +00:00
naruse 21ab98a997 * lib/uri/rfc3986_parser.rb (URI::RFC3986_Parser::RFC3986_URI):
allow '[' and ']' for URI input (and escape). [Bug #10402]

* lib/uri/generic.rb (URI#query=): escape '[', '\', and ']'.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48244 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-03 00:33:47 +00:00
naruse 167dd87d36 bump URI::VERSION to 0.10.0
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48243 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-03 00:33:44 +00:00
ko1 831e33c780 * vm_core.h: change iseq parameter data structure.
https://bugs.ruby-lang.org/issues/10440#change-49694
  * change terminology `arg' to `param'.
  * move rb_iseq_t::arg_* to rb_iseq_t::param.
  * move rb_iseq_t::arg_size to rb_iseq_t::param::size.
  * move rb_iseq_t::argc to rb_iseq_t::param::lead_num.
  * move rb_iseq_t::arg_opts to rb_iseq_t::param::opt_num.
  * move rb_iseq_t::arg_rest to rb_iseq_t::param::rest_start.
  * move rb_iseq_t::arg_post_num to rb_iseq_t::param::post_num.
  * move rb_iseq_t::arg_post_start to rb_iseq_t::param::post_start.
  * move rb_iseq_t::arg_block to rb_iseq_t::param::block_start.
  * move rb_iseq_t::arg_keyword* to rb_iseq_t::param::keyword.
    rb_iseq_t::param::keyword is allocated only when keyword
    parameters are available.
  * introduce rb_iseq_t::param::flags to represent parameter
    availability. For example, rb_iseq_t::param:🎏:has_kw
    represents that this iseq has keyword parameters and
    rb_iseq_t::param::keyword is allocated.
    We don't need to compare with -1 to check availability.
  * remove rb_iseq_t::arg_simple.
* compile.c: catch up this change.
* iseq.c: ditto.
* proc.c: ditto.
* vm.c, vm_args.c, vm_dump.c, vm_insnhelper.c: ditto.
* iseq.c (iseq_data_to_ary): support keyword argument.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48242 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-02 23:14:21 +00:00
ko1 5d1f152fa3 * test/ruby/test_method.rb: r48239 makes this test green.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48241 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-02 18:40:45 +00:00
svn 5bcfbd91a7 * properties.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48240 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-02 18:03:16 +00:00
ko1 fbebd502f9 * rewrite method/block parameter fitting logic to optimize
keyword arguments/parameters and a splat argument.
  [Feature #10440] (Details are described in this ticket)
  Most of complex part is moved to vm_args.c.
  Now, ISeq#to_a does not catch up new instruction format.
* vm_core.h: change iseq data structures.
  * introduce rb_call_info_kw_arg_t to represent keyword arguments.
  * add rb_call_info_t::kw_arg.
  * rename rb_iseq_t::arg_post_len to rb_iseq_t::arg_post_num.
  * rename rb_iseq_t::arg_keywords to arg_keyword_num.
  * rename rb_iseq_t::arg_keyword to rb_iseq_t::arg_keyword_bits.
    to represent keyword bitmap parameter index.
    This bitmap parameter shows that which keyword parameters are given
    or not given (0 for given).
    It is refered by `checkkeyword' instruction described bellow.
  * rename rb_iseq_t::arg_keyword_check to rb_iseq_t::arg_keyword_rest
    to represent keyword rest parameter index.
  * add rb_iseq_t::arg_keyword_default_values to represent default
    keyword values.
  * rename VM_CALL_ARGS_SKIP_SETUP to VM_CALL_ARGS_SIMPLE
    to represent
      (ci->flag & (SPLAT|BLOCKARG)) &&
      ci->blockiseq == NULL &&
      ci->kw_arg == NULL.
* vm_insnhelper.c, vm_args.c: rewrite with refactoring.
  * rewrite splat argument code.
  * rewrite keyword arguments/parameters code.
  * merge method and block parameter fitting code into one code base.
* vm.c, vm_eval.c: catch up these changes.
* compile.c (new_callinfo): callinfo requires kw_arg parameter.
* compile.c (compile_array_): check the last argument Hash object or
  not. If Hash object and all keys are Symbol literals, they are
  compiled to keyword arguments.
* insns.def (checkkeyword): add new instruction.
  This instruction check the availability of corresponding keyword.
  For example, a method "def foo k1: 'v1'; end" is cimpiled to the
  following instructions.
    0000 checkkeyword     2, 0  # check k1 is given.
    0003 branchif         9     # if given, jump to address #9
    0005 putstring        "v1"
    0007 setlocal_OP__WC__0 3   # k1 = 'v1'
    0009 trace            8
    0011 putnil
    0012 trace            16
    0014 leave
* insns.def (opt_send_simple): removed and add new instruction
  "opt_send_without_block".
* parse.y (new_args_tail_gen): reorder variables.
  Before this patch, a method "def foo(k1: 1, kr1:, k2: 2, **krest, &b)"
  has parameter variables "k1, kr1, k2, &b, internal_id, krest",
  but this patch reorders to "kr1, k1, k2, internal_id, krest, &b".
  (locate a block variable at last)
* parse.y (vtable_pop): added.
  This function remove latest `n' variables from vtable.
* iseq.c: catch up iseq data changes.
* proc.c: ditto.
* class.c (keyword_error): export as rb_keyword_error().
* common.mk: depend vm_args.c for vm.o.
* hash.c (rb_hash_has_key): export.
* internal.h: ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48239 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-02 18:02:55 +00:00
svn 055a465ac4 * properties.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48238 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-02 17:36:57 +00:00
ko1 16377c36b9 * sample/simple-bench.rb: added to measure performance of simple
lines.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48237 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-02 17:36:51 +00:00
svn 1d4e282d75 * 2014-11-03
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48236 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-02 17:35:09 +00:00
ko1 90373dadfb * gc.c (obj_info): show T_STRING more details.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48235 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-02 17:34:51 +00:00
nobu c291516f14 tool/instruction.rb: remove extra blank lines
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48234 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-02 01:06:50 +00:00
nobu 862c62b4e2 tool/instruction.rb: remove trailing spaces
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48233 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-02 00:47:25 +00:00
akr e6aac32abf * test/openssl/test_ssl.rb: Don't ignore errors on listener threads,
as much as possible.

* test/openssl/test_ssl_session.rb: Ditto.

* test/openssl/test_partial_record_read.rb: Ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48232 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-01 16:32:59 +00:00
akr a25e9259d5 ignore_ssl_accept_error option is changed to ignore_listener_error.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48231 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-01 15:56:29 +00:00
svn c21ae1e1fd * 2014-11-02
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48230 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-01 15:35:36 +00:00
akr aa46754bc9 comment updated.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48229 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-01 15:35:31 +00:00
akr 88c37cdcc3 start_server refined.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48228 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-01 14:53:32 +00:00
akr 3ec72f078c * test/openssl/utils.rb (start_server): Don't close sockets before
threads finished.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48227 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-01 14:12:11 +00:00
akr f4b417eb43 refine message of assert_join_threads.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48226 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-01 13:29:18 +00:00
akr d5802c512e * test/openssl/test_ssl_session.rb (test_ctx_client_session_cb): Don't
ignore errors of SSL accept.
  (test_ctx_server_session_cb): Ditto.

* test/openssl/utils.rb (server_loop): Add ignore_ssl_accept_error
  argument.
  (start_server): Refine threads waits.

* test/ruby/envutil.rb (assert_join_threads): Show a thread before
  backtrace.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48225 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-01 13:10:37 +00:00
akr a7c425cbf3 * test/openssl/utils.rb (start_server, server_loop): Use a
pipe to stop server instead of shutdown/close a listening socket.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48224 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-01 11:41:30 +00:00
akr bfd540cd75 * test/ruby/envutil.rb (assert_join_threads): New assertion to
join multiple threads without exceptions.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48223 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-01 10:25:57 +00:00
akr 905b52217c * bignum.c (bary_mul_balance_with_mulfunc): Fix free work area
location.
  [ruby-dev:48723] [Bug #10464]
  [ruby-core:66044] [Bug #10465]
  Reported by Kohji Nishihama.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48222 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-01 08:13:30 +00:00
nobu 119afd7531 parse.y: separate error messages
* parse.y (parse_atmark): separate error messages for sigil types,
  and make more descriptive

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48221 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-01 06:59:43 +00:00
nobu b5ba1dcdf0 parse.y: invalid instance/class variable names
* parse.y (parse_atmark): mere atmark and two atmarks without
  succeeding identifiers are invalid as instance/class variable
  names.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48220 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-01 06:45:17 +00:00
nobu 3dce236bf5 common.mk: remove dl from EXT_SRCS
* common.mk (EXT_SRCS): remove dl/callback which has been removed
  at r48217.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48219 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-31 22:23:43 +00:00
suke 985364954f ext/win32ole/win32ole_variant.c: use typed data.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48218 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-31 21:33:51 +00:00
tenderlove 07308c4d30 * ext/dl/*: remove DL as it is replaced by Fiddle.
[Feature #5458] Thanks to Jonan Scheffler <jonanscheffler@gmail.com>
  for this patch

* test/dl/*: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48217 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-31 21:13:09 +00:00
headius 88326272bc * test/openssl/test_ssl.rb: Add certificate verification chain
test from JRuby community.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48216 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-31 20:49:51 +00:00
svn e697783d6e * 2014-11-01
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48215 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-31 19:37:50 +00:00
headius 08d0b57000 * test/psych/test_emitter.rb: Fix line_width test...initial value
is impl-specific and attr assignment always returns LHS.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48214 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-31 19:37:38 +00:00
knu c02fa39463 Make Digest() thread-safe.
* ext/digest/lib/digest.rb (Digest()): This function should now be
  thread-safe.  If you have a problem with regard to on-demand
  loading under a multi-threaded environment, preload "digest/*"
  modules on boot or use this method instead of directly
  referencing Digest::*. [Bug #9494]
  cf. https://github.com/aws/aws-sdk-ruby/issues/525

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48213 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-31 13:21:51 +00:00
knu 2172b44898 * test/digest/test_digest.rb: Drop #!. This no longer runs
stand-alone because it depends on ruby/envutil.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48212 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-31 13:12:44 +00:00
usa a12ca2113d * win32/setup.mak: $(APPEND) with some arguments insert a space before
the arguments, so it causes error if the arguments are expected to be
  a macro definition.  this fix resolve the build error introduced at
  r48210.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48211 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-31 08:25:07 +00:00
nobu 74ec76990a win32/setup.mak: get target architecture from the compiler
* win32/Makefile.sub, win32/setup.mak (MACHINE): get target
  architecture from the compiler, instead of environment variable
  at build time, which is irrelevant to runtime environment, and
  not set when running in cygwin sshd.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48210 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-31 08:07:50 +00:00
nobu 26c13db6e6 test_time.rb: test_iso8601
* test/test_time.rb (TestTimeExtension#test_iso8601): run all
  xmlschema tests with iso8601 method, and fix the test name.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48209 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-31 08:07:46 +00:00
knu f701b0dfc4 Bump Syslog::Logger::VERSION to 2.1.0.
* ext/syslog/lib/syslog/logger.rb (Syslog::Logger::VERSION): Bump
  the VERSION to 2.1.0. [ruby-core:64483] [Bug #10159]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48208 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-31 07:49:18 +00:00