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

41265 Коммитов

Автор SHA1 Сообщение Дата
svn 9fec02ad20 * 2015-11-15
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52578 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-15 02:05:20 +00:00
nobu c87bee1f45 ruby.1: --dump [ci skip]
* man/ruby.1: describe --dump option arguments.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52577 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-15 02:04:37 +00:00
akr 373e87a74d * ext/socket/lib/socket.rb: Specify frozen_string_literal: true.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52576 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-14 13:15:33 +00:00
akr fb2a6ecf9e * lib/time.rb: Use "<<" to reduce string allocation.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52575 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-14 12:45:30 +00:00
akr af4c1ac8af test/test_tsort.rb: Specify frozen_string_literal: true.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52574 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-14 09:43:18 +00:00
nobu 22876f4d7d compile.c: fix variable
* compile.c (iseq_peephole_optimize): use proper variable, without
  cast.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52573 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-14 09:03:08 +00:00
akr 4c0158ac59 * lib/tsort.rb: Specify frozen_string_literal: true.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52572 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-14 08:46:11 +00:00
akr 2f7ac37beb * lib/resolv-replace.rb: Specify frozen_string_literal: true.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52571 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-14 08:25:30 +00:00
nobu 59a3fe5846 hash.c: compare methods [ci skip]
* hash.c (rb_hash_{le,lt,ge,gt}): [DOC] for [Feature #10984]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52570 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-14 08:13:11 +00:00
akr fb7ccd690e * lib/time.rb: Specify frozen_string_literal: true.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52569 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-14 08:00:29 +00:00
akr 1ec544695f * lib/open3.rb: Specify frozen_string_literal: true.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52568 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-14 07:43:23 +00:00
nobu 8aa3ac1373 compile.c: remove unused labels
* compile.c (iseq_label_data): manage reference count.

* compile.c (iseq_peephole_optimize): remove unreferred labels
  which may disturb optimization.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52567 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-14 06:26:15 +00:00
ko1 db1387905a additional fix of comment line
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52566 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-13 20:05:37 +00:00
ko1 f1028f5cf7 * node.h: remove old comments.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52565 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-13 20:04:32 +00:00
ko1 32a9647264 * refactoring CREF related code.
* eval_intern.h: remove unused setter functions.
  CREF_CLASS_SET()
  CREF_NEXT_SET()
  CREF_SCOPE_VISI_COPY()

* eval_intern.h: rename flags:
  * NODE_FL_CREF_PUSHED_BY_EVAL_ -> CREF_FL_PUSHED_BY_EVAL
  * NODE_FL_CREF_OMOD_SHARED_ -> CREF_FL_OMOD_SHARED
  and use IMEMO_FL_USER1/2.

* vm.c (vm_cref_new): accept push_by_eval parameter.

* vm.c (vm_cref_new_use_prev): added for rb_vm_rewrite_cref().

* vm_insnhelper.c (vm_cref_push): accept pushed_by_eval parameter.

* vm_insnhelper.h: remove unused macros:
  COPY_CREF_OMOD() and COPY_CREF().

* vm_eval.c, insns.def: catch up this fix.




git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52564 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-13 20:02:19 +00:00
ko1 b73e900f50 * vm.c (vm_define_method): refactoring.
* get CREF in this function.
  * cbase is no longer needed (CREF_CLASS(cref) is enough).

* compile.c: RubyVM::FrozenCore.define_method only accept 2 args.




git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52563 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-13 18:01:59 +00:00
ko1 25f5dd6799 * vm.c (vm_define_method): do not use current CREF immediately,
but check CREF in environment or methods. Methods defined in methods
  should be public.
  [Bug #11571]

* vm_method.c (rb_scope_module_func_check): check CREF in env or me.
  if CREF is contained by `me', then return FALSE.

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




git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52562 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-13 17:38:12 +00:00
ko1 dd4cec36ca * method.h: constify rb_cref_t::scope_visi;
* eval_intern.h (CREF_SCOPE_VISI_COPY): catch up this fix.

* vm_method.c: ditto.




git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52561 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-13 17:20:11 +00:00
svn 6687b34876 * 2015-11-14
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52560 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-13 17:07:03 +00:00
ngoto 238c6c5b89 * pack.c (pack_unpack, AVOID_CC_BUG): Very ugly workaround for
optimization bug of Oracle Solaris Studio 12.4 on Solaris
  with -xO4 optimization option. [Bug #11684]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52559 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-13 17:06:43 +00:00
shirosaki f2b760e336 Unset LD_PRELOAD on mingw
* configure.in: unset LD_PRELOAD on mingw. msys2 child processes
  crash at make test-all with LD_PRELOAD.
  [ruby-core:71461] [Bug #11680]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52558 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-13 14:11:30 +00:00
zzak 293aa87118 Commit miss from r52556
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52557 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-13 05:03:55 +00:00
zzak 85dd19cf38 * ext/openssl/ossl_pkey.c: Merge ruby/openssl@b9ea8ef [Bug #10735]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52556 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-13 05:01:15 +00:00
zzak 47135def05 * ext/openssl/ossl_ssl.c: Merge ruby/openssl@81e1a30
* test/openssl/test_ssl.rb: ditto


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52555 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-13 04:10:58 +00:00
nobu 2069c9e031 prelude.rb: deprecate Thread.exclusive
* prelude.rb (Thread.exclusive): warn as deprecated.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52554 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-13 04:05:43 +00:00
nobu aa4ab1814d parse.y: optimize condition for unless
* parse.y (new_unless): optimize constant condition for `unless`
  as well as `if`.  [Fix GH-1092]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52553 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-13 01:36:42 +00:00
svn 7765e2e63b * 2015-11-13
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52552 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-13 01:09:16 +00:00
hsbt f1f790db39 * ext/psych/psych.gemspec: bump version to 2.0.15
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52551 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-13 01:08:45 +00:00
nobu d674e6dfec parse.y: exact magic comment name
* parse.y (parser_magic_comment): should match exactly.
  [ruby-core:71460] [Bug #11679]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52550 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-12 09:44:29 +00:00
nobu 2c42aac9fb prelude.c.tmpl: optimize
* template/prelude.c.tmpl: enable tail call optimization.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52549 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-12 07:16:23 +00:00
nobu 68e16ddd79 parse.y: ANDDOT fluent interface
* parse.y (parser_yylex): ANDDOT at the head of the line denote
  line continuation from previous one to support fluent interface,
  as well as single dot.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52548 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-12 05:17:06 +00:00
nobu 88edab89f4 parse.y: simplify
* parse.y (parser_yylex): reduce RIPPER ifdefs.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52547 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-12 05:16:03 +00:00
hsbt a2ba489e2e * lib/rubygems: Update to RubyGems 2.5.0+ HEAD(db78980).
this version includes #1367 , #1373 , #1375
* test/rubygems: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52546 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-12 04:50:06 +00:00
akr 8b129406c6 Module#<=> is not suitable for Comparable.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52545 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-12 03:50:58 +00:00
akr 66ef9b9310 add a test.
https://bugs.ruby-lang.org/issues/10984#note-13


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52544 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-12 03:50:22 +00:00
svn fd36c7524d * properties.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52543 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-12 02:01:18 +00:00
svn 868c90634e * 2015-11-12
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52542 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-12 02:01:17 +00:00
normal cee7f6911b io.c: avoid kwarg parsing in C API
* benchmark/bm_io_nonblock_noex2.rb: new benchmark based
  on bm_io_nonblock_noex.rb
* io.c (io_read_nonblock): move documentation to prelude.rb
  (io_write_nonblock): ditto
  (Init_io): private, internal methods for prelude.rb use only
* prelude.rb (IO#read_nonblock): wrapper + documentation
  (IO#write_nonblock): ditto
  [ruby-core:71439] [Feature #11339]

rb_scan_args and hash lookups for kwargs in the C API are clumsy and
slow.  Instead of improving the C API for performance, use Ruby
instead :)

Implement IO#read_nonblock and IO#write_nonblock in prelude.rb
to avoid argument parsing via rb_scan_args and hash lookups.

This speeds up IO#write_nonblock and IO#read_nonblock benchmarks
in both cases, including the original non-idiomatic case where
the `exception: false' hash is pre-allocated to avoid GC pressure.

Now, writing the kwargs in natural, idiomatic Ruby is fastest.
I've added the noex2 benchmark to show this.

2015-11-12 01:41:12 +0000
target 0: a (ruby 2.3.0dev (2015-11-11 trunk 52540) [x86_64-linux])
target 1: b (ruby 2.3.0dev (2015-11-11 avoid-kwarg-capi 52540)
-----------------------------------------------------------
benchmark results:
minimum results in each 10 measurements.
Execution time (sec)
name              a       b
io_nonblock_noex    2.508   2.382
io_nonblock_noex2   2.950   1.882

Speedup ratio: compare with the result of `a' (greater is better)
name              b
io_nonblock_noex    1.053
io_nonblock_noex2   1.567

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52541 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-12 02:00:41 +00:00
kazu 4a59524099 add ticket numbers
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52540 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-11 13:28:33 +00:00
nobu 66688cde3b compile.c: comments for r52517 [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52538 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-11 09:38:20 +00:00
nobu 56e3b49304 sprintf.c: nil value is valid
* sprintf.c (rb_str_format): look up the key, then get default
  value and raise KeyError if the returned value is nil.
  [ruby-dev:49338] [Ruby trunk - Bug #11677]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52537 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-11 09:30:31 +00:00
nobu 9cf1136481 vm_eval.c: skip internal names
* vm_eval.c (local_var_list_add): skip internal local variable
  name by its type but not if it has a name.  internal local
  variable names are just unique per frame, not globally.
  [ruby-core:71437] [Bug #11674]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52536 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-11 08:38:27 +00:00
shugo 66a138c2d9 Add the ticket number to ChangeLog.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52535 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-11 06:11:47 +00:00
hsbt ccf647f71c * transcode.c: fix a typo
[ci skip][fix GH-1091] Patch by @jwworth

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52534 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-11 05:14:36 +00:00
svn b32a30340b * remove trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52533 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-11 03:48:58 +00:00
shugo 58af10ecbd * lib/net/ftp.rb (initialize): Connections are in passive mode per
default now.  The default mode can be changed by
  Net::FTP.default_passive=.

* lib/net/ftp.rb (default_passive=, default_passive): new methods.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52532 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-11 03:48:45 +00:00
nobu f8cd2190f0 time/test_new.rb: fix tests
* test/-ext-/time/test_new.rb (test_timespec_new): fix for r52519.
  swap utc and localtime.

* test/-ext-/time/test_new.rb (test_timespec_now): fix method name
  typo which has overwritten test_timespec_new.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52531 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-11 00:07:16 +00:00
nobu def4370a55 sprintf.c: hash default value
* sprintf.c (rb_str_format): respect default value of a hash.  no
  longer raises KeyError unless the default value of the hash is
  nil.  [ruby-core:71354] [Bug #11661]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52530 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-11 00:03:15 +00:00
svn 8d9e360007 * properties.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52529 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-10 17:54:58 +00:00
svn ca6ee8061c * 2015-11-11
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52528 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-10 17:53:07 +00:00