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

45759 Коммитов

Автор SHA1 Сообщение Дата
nobu d0cf19d9ed [DOC] mark up literals
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57693 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-23 02:11:16 +00:00
nobu 95a476c859 [DOC] keyword argument _exception_
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57692 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-23 02:00:28 +00:00
nobu 53b4bf3134 socket.rb: [DOC] fix nonblock methods
* ext/socket/lib/socket.rb (BasicSocket#recv_nonblock): fix
  exception class and symbol.

* ext/socket/lib/socket.rb (BasicSocket#recvmsg_nonblock): ditto.

* ext/socket/lib/socket.rb (Socket#recvfrom_nonblock): fix the
  method name.

* ext/socket/lib/socket.rb (UDPSocket#recvfrom_nonblock): both.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57691 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-23 01:54:13 +00:00
nobu d5eef0301a [DOC] {read,write}_nonblock with exception: false
Update docs to reflect EOF behavior change of read_nonblock and
write_nonblock when using `exception: false`.

[Fix GH-1527]
Author:    Russell Davis <russell-stripe@users.noreply.github.com>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57690 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-23 01:15:27 +00:00
nobu 2e2063fe16 rational.c: infinity in power
* rational.c (nurat_expt): return 0 due to overflow.
  [ruby-core:79686] [Bug #13242]:

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57689 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-22 23:49:40 +00:00
nobu 06010b2b05 rational.c: infinity in power
* rational.c (nurat_expt): return Infinity due to overflow.
  [ruby-core:79686] [Bug #13242]:

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57688 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-22 23:28:26 +00:00
svn 3f6aeba69a * 2017-02-23
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57687 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-22 15:46:43 +00:00
kazu 3f1d2dd872 rational.c: fix rdoc
* rational.c: [DOC] fix wrong indentations and comment out some lines
  in code examples to make them valid Ruby code and syntax highlighted
  on the rendered page.

[ci skip] [ruby-core:79607] [Bug #13233]
Author:    Marcus Stollsteimer <sto.mar@web.de>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57686 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-22 15:46:43 +00:00
nobu 5318154fe1 eval_error.c: backstrace in reverse order
* eval_error.c (rb_threadptr_error_print): print backtrace and
  error message in reverse order if STDERR is unchanged and a tty.
  [Feature #8661]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57685 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-22 08:50:25 +00:00
akr dbd4c4a7b3 refine warning message for binary regexp /.../n.
Reported by Herwin W.  [ruby-core:78592] [Bug #13024]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57684 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-22 07:31:25 +00:00
nobu 7d54b4ea58 Thread#fetch
* thread.c (rb_thread_fetch): add new method Thread#fetch.
  [Feature #13009]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57683 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-22 07:16:13 +00:00
nobu 31ef3124a9 numeric.c: Numeric#clone and #dup
* numeric.c (num_clone, num_dup): no longer raises TypeError,
  returns the receiver instead as well as Integer and Float.
  [ruby-core:79636] [Bug #13237]

* object.c (rb_immutable_obj_clone): immutable object clone with
  freeze optional keyword argument.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57682 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-22 02:02:11 +00:00
svn 4096f39dcf * 2017-02-22
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57681 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-22 01:55:11 +00:00
nobu 80b8ee9794 object.c: refactor rb_obj_clone and rb_obj_clone2
* object.c (rb_obj_clone2): extract option for clone, and split by
  whether the object is immutable or mutable.

* object.c (rb_obj_clone): no arguments, return immutable object
  immediately.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57680 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-22 01:55:10 +00:00
nobu f2c5146dc4 object.c: message encoding
* object.c (rb_obj_clone2): preserve encoding in error messages.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57679 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-21 14:51:22 +00:00
nobu f5faaf7b9a backward.h: RClassDeprecated
* include/ruby/backward.h (RClassDeprecated): move from
  ruby/ruby.h.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57678 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-21 14:42:02 +00:00
svn 6699debd61 * properties.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57677 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-21 08:18:16 +00:00
ko1 76c4cca19c add performance counting mechanism for MRI debug/tuning purpose.
* How to enable this feature?
  * define USE_DEBUG_COUNTER as 1.
  * you can disable to output the result with
    RUBY_DEBUG_COUNTER_DISABLE environment variable
    even if USE_DEBUG_COUNTER == 1.

* How to add new counter?
  * add COUNTER(<name>) line on debug_counter.h.
  * include "debug_counter.h"
  * insert RB_DEBUG_COUNTER_INC(<name>) line on your favorite place.

* counter output example:
  [RUBY_DEBUG_COUNTER]    mc_inline_hit   999
  [RUBY_DEBUG_COUNTER]    mc_inline_miss  3
  [RUBY_DEBUG_COUNTER]    mc_global_hit   23
  [RUBY_DEBUG_COUNTER]    mc_global_miss  273
  [RUBY_DEBUG_COUNTER]    mc_global_state_miss    3
  [RUBY_DEBUG_COUNTER]    mc_class_serial_miss    0
  [RUBY_DEBUG_COUNTER]    mc_cme_complement       0
  [RUBY_DEBUG_COUNTER]    mc_cme_complement_hit   0
  [RUBY_DEBUG_COUNTER]    mc_search_super 1384
  [RUBY_DEBUG_COUNTER]    ivar_get_hit    0
  [RUBY_DEBUG_COUNTER]    ivar_get_miss   0
  [RUBY_DEBUG_COUNTER]    ivar_set_hit    0
  [RUBY_DEBUG_COUNTER]    ivar_set_miss   0
  [RUBY_DEBUG_COUNTER]    ivar_get        431
  [RUBY_DEBUG_COUNTER]    ivar_set        465

  * mc_... is related to method caching.
  * ivar_... is related to instance variable accesses.

* compare with dtrace/system tap features, there are completely
  no performacne penalties when it is disabled.

* This feature is supported only on __GNUC__ compilers.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57676 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-21 08:18:15 +00:00
nobu 51de3aa2b2 backward.h: move deprecated declaration
* include/ruby/backward.h (rb_autoload): move declaration of
  deprecated function.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57675 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-21 06:16:50 +00:00
nobu cd0426c00b variable.c: remove deprecated internal feature
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57674 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-21 06:16:49 +00:00
nobu f922f1cbeb error.c: remove deprecated internal features
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57673 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-21 06:07:22 +00:00
nobu f4c2b33eac complex.c: remove deprecated functions
* complex.c (rb_complex_set_real, rb_complex_set_imag): remove
  functions deprecated at 2.2.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57672 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-21 06:07:21 +00:00
nobu 556a1352e4 backward.h: 2.2 deprecated features
* include/ruby/backward.h (DECLARE_DEPRECATED_FEATURE): move
  features deprecated at 2.2.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57671 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-21 05:17:41 +00:00
nobu bd26c796a1 internal.h: removed function declaration
* internal.h (rb_compile_error_str): remove declaration of removed
  internal function at r54189.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57670 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-21 05:16:49 +00:00
nobu a9c1522969 variable.c: noreturn in GCC
* variable.c (rb_generic_ivar_table): declare as noreturn only in
  GCC, which does not err on different attributes.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57669 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-21 01:28:30 +00:00
svn 9291d3d368 * 2017-02-21
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57668 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-20 19:12:53 +00:00
ko1 56c38a648b remove harmful declaration.
* variable.c (gen_ivtbl_get): declaration conflict on VC++.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57667 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-20 19:12:52 +00:00
yui-knk 2235695cbb compile.c: Fix a typo
* compile.c (compile_branch_condition): NODE_LIT is
  always true.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57666 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-20 14:40:56 +00:00
kazu 7010dc6f68 extension.rdoc: add document title
* doc/extension.rdoc, doc/extension.ja.rdoc: [DOC]
  add title and adapt subheading levels.

* doc/extension.rdoc: [DOC] fix subheading level of section
  about "Ruby Constants That Can Be Accessed From C".

* doc/extension.ja.rdoc: [DOC] add missing subheading.

[ruby-core:79590] [Bug #13229]
Author:    Marcus Stollsteimer <sto.mar@web.de>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57665 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-20 12:20:22 +00:00
naruse 11eba07b83 Supress warning: function might be candidate for attribute 'noreturn'
GCC7 shows it.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57664 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-20 10:59:10 +00:00
naruse c022a09773 Cast as VALUE to suppress type warnings
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57663 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-20 10:59:10 +00:00
naruse 1220638f5b They are enum yytokentype, need cast
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57662 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-20 10:59:09 +00:00
nobu a9925e2234 assertions.rb: ignore exit in child
* test/lib/test/unit/assertions.rb (assert_separately): ignore
  SystemExit.  unsuccessful exit still fails an assertion later.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57661 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-20 10:10:08 +00:00
nobu ea940cc4dc regparse.c: initialize return values
* regparse.c (parse_char_class): initialize return values before
  depth limit check.  returned values will be freed in callers
  regardless the error.  [ruby-core:79624] [Bug #13234]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57660 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-20 09:46:12 +00:00
nobu f28de8c06a parse.y: new_qcall
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57659 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-20 05:35:57 +00:00
nobu 35ac7cc09f parse.y: ID2VAL
* parse.y (ID2VAL): split from TOKEN2VAL.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57658 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-20 05:35:56 +00:00
svn 6649e4c5d5 * 2017-02-20
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57657 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-20 02:16:23 +00:00
nobu fca3cf6637 envutil.rb: diagnostic_reports for ruby-runner
* test/lib/envutil.rb (EnvUtil.diagnostic_reports): ruby-runner
  execs "RUBY_INSTALL_NAME" file, so search by that name.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57656 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-20 02:16:22 +00:00
nobu 4d47e8d993 vm_insnhelper.c: super to module in refinement
* vm_insnhelper.c (vm_call_zsuper): method defined in module in
  refinement is not callable as-is.  dispatch again.
  [ruby-core:79588] [Bug #13227]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57655 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-19 01:27:52 +00:00
svn 7e5140e285 * 2017-02-19
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57654 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-18 22:38:36 +00:00
nobu 9cbe4553f4 COPYING: expand tabs
* COPYING: expand tabs like as the rest lines.  [Fix GH-1526]

Author: Philippe Ombredanne <pombredanne@gmail.com>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57653 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-18 22:38:35 +00:00
kazu fbd5cda6aa {lib,test}/cgi: Specify frozen_string_literal: true.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57652 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-18 05:52:16 +00:00
nobu 3203ae53ff array.c: check if numeric
* array.c (finish_exact_sum): add 0 and the initial value to check
  if the latter is numeric.  [ruby-core:79572] [Bug #13222]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57651 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-18 04:23:20 +00:00
svn ca82060640 * 2017-02-18
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57650 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-18 03:42:36 +00:00
nobu 7dccda437b array.c: finish_exact_sum
* array.c (finish_exact_sum): extract duplicate code from
  rb_ary_sum.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57649 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-18 03:42:35 +00:00
nobu 3d031cea42 test_fileutils.rb: no broken symlinks on Cygwin
* test/fileutils/test_fileutils.rb (no_broken_symlink): exclude
  test using broken symlinks on Cygwin, which are not allowed
  because of the directory flag of Windows native symlink.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57648 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-17 13:31:43 +00:00
nobu 1b4df62546 test_fileutils.rb: fix relative symlink path
* test/fileutils/test_fileutils.rb (test_rm_symlink): fix relative
  symlink path, the target should be relative to the directory in
  which the symlink gets created.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57647 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-17 13:31:42 +00:00
nobu c85a58d512 test_fileutils.rb: workaround for Cygwin
* test/fileutils/test_fileutils.rb (root_in_posix): seems Cygwin
  has some different conditions for privilege.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57646 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-17 10:22:10 +00:00
nobu 1ac36ecf00 test_fileutils.rb: cache distinct UIDs
* test/fileutils/test_fileutils.rb: cache distinct UIDs as
  constants at initialization.  assume no UIDs will be
  added/removed during tests.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57645 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-17 10:22:09 +00:00
svn 68319db7ac * 2017-02-17
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57644 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-17 05:45:45 +00:00