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

45062 Коммитов

Автор SHA1 Сообщение Дата
mrkn b848f3c7e1 rational.c: optimize rational - integer
* rational.c (nurat_sub): optimize rational - integer.
  Author: Tadashi Saito <tad.a.digger@gmail.com>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56710 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-11 14:45:11 +00:00
mrkn d028d6984f rational.c: optimize rational + rational
* rational.c (f_addsub): optimize rational + rational.
  Author: Tadashi Saito <tad.a.digger@gmail.com>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56709 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-11 14:42:53 +00:00
mrkn 268203c5fc rational.c: prevent unused warning
* rational.c (f_mod): define only when NDEBUG is not defined to prevent
  unused warning

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56708 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-11 14:39:34 +00:00
mrkn f64a53462e numeric.c, rational.c: refactor by using FIXNUM_NEGATIVE_P and FIXNUM_ZERO_P
* numeric.c (num_zero_p, fix_divide, fix_mod, fix_divmod): refactor by using
  FIXNUM_NEGATIVE_P and FIXNUM_ZERO_P.

* rational.c (INT_NEGATIVE_P, INT_ZERO_P): ditto.

* internal.h: move FIXNUM_NEGATIVE_P and FIXNUM_ZERO_P from numeric.c

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56707 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-11 14:39:25 +00:00
mrkn 8ee8c5eeb6 rational.c: optimize Integer#gcd.
* rational.c (f_gcd_normal): optimize Integer#gcd.
  Author: Tadashi Saito <tad.a.digger@gmail.com>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56706 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-11 14:39:16 +00:00
mrkn dae15fa0d4 rational.c: optimize rational + integer.
* rational.c (rb_rational_plus): optimize rational + integer.
  Author: Tadashi Saito <tad.a.digger@gmail.com>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56705 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-11 14:39:07 +00:00
mrkn 70f5ad7c41 rational.c: optimize rational + float.
* rational.c (rb_rational_plus): optimize rational + float.
  Author: Tadashi Saito <tad.a.digger@gmail.com>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56704 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-11 14:38:59 +00:00
nobu 54bc0a446d range.c: check loading
* range.c (range_loader): check loading values if the data came
  from an initialized range object. [ruby-core:78067] [Bug #12915]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56703 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-11 11:52:03 +00:00
nobu e41ebc50dc rational.c: check load
* rational.c (nurat_loader, nurat_marshal_load): check if loading
  values are Integer.  [ruby-core:78071] [Bug #12918]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56702 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-11 07:26:14 +00:00
nobu 0f9ce57b86 rational.c: optimize
* rational.c (f_{lt,eqeq,zero,one,minus_one,kind_of}_p): add RTEST
  to results of funcalls.

* rational.c (f_negative_p, k_{integer,float,rational}_p):
  optimize.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56701 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-11 07:08:53 +00:00
nobu ac777fa1b8 rational.c: use RB_INTEGER_TYPE_P
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56700 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-11 07:08:52 +00:00
akr 19e6276125 Enable the document for Kernel[#.]pp.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56699 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-11 03:04:38 +00:00
nobu def18ca59d vm_eval.c: reorder
* vm_eval.c (vm_call0_body): reorder the conditions.
  [ruby-core:78073] [Bug #12920]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56698 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-11 00:08:41 +00:00
mrkn 3e430c3a49 rational.c: optimize Rational#to_f by using rb_int_fdiv
* rational.c (nurat_to_f): optimize Rational#to_f by using rb_int_fdiv.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56697 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-10 15:23:43 +00:00
svn eb270be29b * 2016-11-11
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56696 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-10 15:23:34 +00:00
mrkn c05cfe3739 numeric.c, internal.h: export int_fdiv() as rb_int_fdiv()
* numeric.c (rb_int_fdiv): export int_fdiv() as rb_int_fdiv().

* internal.h (rb_int_fdiv): add declaration of rb_int_fdiv().

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56695 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-10 15:23:33 +00:00
nobu 9996945af9 vm_eval.c: fix refined method when prepended
* vm_eval.c (vm_call0_body): refined module should not be skipped
  as prepended.  [ruby-core:78073] [Bug #12920]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56694 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-10 14:18:52 +00:00
nobu 1a7aba1b47 range.c: check if range modifiable
* range.c (range_modify): frozen object cannot be modified.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56693 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-10 10:39:51 +00:00
nobu 04a4fd8957 parse.y: new_attr_op_assign in ripper needs symbol
* parse.y (command_asgn, arg): new_attr_op_assign in ripper
  expects a Symbol VALUE as the operator, not an ID, so convert
  literal IDs to Symbols.  [ruby-core:78069] [Bug #12916]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56692 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-10 07:47:44 +00:00
nobu 25aeeca5b7 test_files.rb: sample size
* test/ripper/test_files.rb (assert_parse_files): extract at least
  one sample.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56691 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-10 07:47:43 +00:00
nobu 5564a498e1 test_files.rb: separate tests
* test/ripper/test_files.rb (assert_parse_files): separate tests
  for each directories.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56690 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-10 06:45:57 +00:00
hsbt 17802b55dd Use environment variable for system ruby detection on appveyor.
* Use ruby_version instead of 22-x64 and 21-x64
 * Use 23-x64 to build Ruby

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56689 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-10 06:38:14 +00:00
nobu a60a7e8112 make-snapshot: repository options
* tool/make-snapshot: add -svn and -git options to direct the
  repository to export.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56688 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-10 03:50:47 +00:00
nobu d0f02c7fd1 make-snapshot: program name
* tool/make-snapshot (package): abort with the basename of this
  script.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56687 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-10 03:50:46 +00:00
shugo aaf3f205e8 Extend timeout for RubyCI chkbuild on Debian 8.2 x86_64.
On that machine, TestQueue#test_thr_kill often fails as follows:

      1) Failure:
    TestQueue#test_thr_kill [/home/hsbt/chkbuild/tmp/build/20161109T213002Z/ruby/test/thread/test_queue.rb:155]:
    only 171/250 done in 30 seconds.

Even if it passes, it takes about 30 seconds:

    [11160/16832] TestQueue#test_thr_kill = 29.80 s

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56686 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-10 02:23:58 +00:00
svn dab206abfb * 2016-11-10
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56685 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-10 00:49:17 +00:00
nobu fb7e6e1039 test_process.rb: fix pgroup test
* test/ruby/test_process.rb (TestProcess#test_execopts_pgroup):
  use dynamically assigned pid for the process group, instead of a
  magic number 2.  [ruby-core:78051] [Bug #12909]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56684 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-10 00:49:17 +00:00
nobu 38320caaf6 range.c: indent [ci skip]
* range.c (range_alloc): adjust indent of comments.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56683 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-10 00:49:16 +00:00
nobu e3fa4ec154 default.mspec: end of options
* spec/default.mspec (MSpecScript): add the end of options to
  runruby.rb, to fix failure at ruby/spec@a0e55db.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56682 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-09 02:42:30 +00:00
a_matsuda 39edad0380 Fix undefined method 'dump' for nil:NilClass (NoMethodError)
Patch by: Dmitry Vorotilin <d.vorotilin@gmail.com> (@route)
Signed-off-by: Akira Matsuda <ronnie@dio.jp>

closes #1475

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56681 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-08 20:25:44 +00:00
a_matsuda d0a6339903 Fix grammar errors
Patch by: Chris Tweedie <cltweedie@gmail.com> (@cltweedie)
Signed-off-by: Akira Matsuda <ronnie@dio.jp>

closes #1074

[ci skip]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56680 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-08 19:55:59 +00:00
a_matsuda f12003d372 Update documentation of fetch
The sentence `Negative values of +index+ count from the end of the array.` can be interpreted that it only holds if a block is given. Clarify it.

Patch by: Lukas Elmer <lukas.elmer@gmail.com> (@lukaselmer)
Signed-off-by: Akira Matsuda <ronnie@dio.jp>

closes #1472
[ci skip]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56679 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-08 19:43:58 +00:00
a_matsuda a01c388465 Fix typo in code doc of proc.c
Insure has a different meaning than ensure and we mean the latter in
this case.

*Ensure* is to do or have what is necessary for success.
Example: These blankets ensure that you’ll be warm enough.

*Insure* is to cover with an insurance policy.
Example: I will insure my home with additional fire and flood policies.

Patch by: Dimitris Zorbas <zorbash@skroutz.gr> (@Zorbash)
Signed-off-by: Akira Matsuda <ronnie@dio.jp>

closes #1352

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56678 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-08 19:37:59 +00:00
kazu 465381dd32 Add a space [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56677 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-08 15:04:29 +00:00
svn 5f6d2b6cd7 * 2016-11-09
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56676 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-08 15:01:56 +00:00
kazu 8be027a30a Add ticket number [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56675 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-08 15:01:55 +00:00
a_matsuda 41cc7eaa7e Update comment about default constant
Patch by: Dave Takahashi <dtcello@gmail.com> (@dtakahas)
Signed-off-by: Akira Matsuda <ronnie@dio.jp>

closes #1151

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56674 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-08 11:57:00 +00:00
nobu eb8ae3bdda vcs.rb: fix GIT.get_revisions
* tool/vcs.rb (VCS::GIT.get_revisions): fix for out-of-place
  build.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56673 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-08 10:44:21 +00:00
svn a4e0e75881 * properties.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56672 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-08 09:31:53 +00:00
naruse 6c5f5233db Moved deleted ChangeLog into doc/ChangeLog-2.4.0
And Add doc/ChangeLog-2016 as an anchor.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56671 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-08 09:31:52 +00:00
nobu ad80c47aca vcs.rb: format from git-log
* tool/vcs.rb (VCS::GIT#export_changelog): re-format from git-log
  to svn style log, instead of git-svn, because cloned working
  directory would not have .git/svn.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56670 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-08 07:47:23 +00:00
nobu 27831204e1 vcs.rb: expand srcdir
* tool/vcs.rb (VCS::GIT#initialize): expand srcdir if it is a
  local path.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56669 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-08 07:45:19 +00:00
nobu 5443a9fdb5 vcs.rb: fix srcdir in VCS::GIT
* tool/vcs.rb (VCS::GIT.cmd_args): add chdir option to arguments
  for IO.popen if srcdir is a local path.  unless -srcdir command
  line option is given, srcdir is the default URL.
  [ruby-core:78036] [Bug #12908]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56668 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-08 06:39:46 +00:00
svn 121ce4ac90 * 2016-11-08
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56667 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-07 15:26:11 +00:00
kazu 9a23a4060a Add entry for Enumerator::Lazy#chunk_while
[ci skip][GH-1186]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56666 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-07 15:26:10 +00:00
kazu 36b4b44bdb fix a typo [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56665 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-07 12:10:36 +00:00
hsbt 911f3d9503 Added Entry for Rubygems 2.6.8 update.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56664 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-07 09:46:42 +00:00
nobu 5f25ecd4b3 test_optimization.rb: for r56208
* test/ruby/test_optimization.rb (test_tailcall_condition_block):
  test for r56208.  [ruby-core:78015] [Bug #12905]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56663 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-07 07:45:18 +00:00
shugo 233fa910d1 Extend Net::HTTP#open_timeout for chkbuild on Solaris 10s.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56662 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-07 06:57:14 +00:00
naruse 4c5f4258aa Add NEWS about removing ChangeLog
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56660 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-07 05:53:42 +00:00