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

49099 Коммитов

Автор SHA1 Сообщение Дата
ko1 f8fac84c7b fix concurrent test.
* test/rubygems/test_require.rb (test_concurrent_require):
  Synchronizations should be in ensure clause. Sometimes
  `require` fails (not sure why) and latch is not released.
  Such case introduces unlimited awaiting.
  This patch soleve this problem.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61501 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-27 14:50:49 +00:00
nobu ecbb128273 fix fd mask detection on os x
This was broken in r59440 (3215b27a9a)
[Bug #14248]

From: Stefan Kaes <skaes@railsexpress.de>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61500 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-27 14:07:49 +00:00
k0kubun 57e95f38b1 tool/downloader.rb: don't suppress exception
on the end of retry failure.

Fixed mistake in r61498

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61499 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-27 13:35:25 +00:00
k0kubun ff6c540adb tool/downloader.rb: retry downloads
because it's randomly failing on CI like
https://ci.appveyor.com/project/ruby/ruby/build/1.0.6724

Actually I'm not sure whether the exception class is Errno::ECONNREFUSED
or not. Please change the rescued exception to the correct one if it's
wrong. I changed to log exception class too in this commit.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61498 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-27 13:32:59 +00:00
k0kubun c46d3de0f5 erb.rb: preserve the behavior for invalid syntax
comment. Fix regression at r58948.

I even don't want to deprecate it because deprecation needs to lex all
embedded Ruby script using Ripper and it would be slow.  So Let me just
keep this behavior of Ruby 2.4. No change is the best compatibility.

This commit stopped using String#-@ because it's harmful for "ambiguous
first argument" warning if we really want to maintain this behavior.

[Bug #14243]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61497 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-27 12:40:03 +00:00
nobu e1f834f9b4 spec_helper.rb: libruby.so iff enable-shared
* spec/ruby/optional/capi/spec_helper.rb (compile_extension):
  search libruby.so only when enable-shared.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61495 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-27 07:28:32 +00:00
nobu 8224002b81 vm_eval.c: expanded eval_string
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61494 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-27 03:00:30 +00:00
nobu ed6680c1df vm_eval.c: split eval_string_with_cref
* vm_eval.c (eval_string_with_cref): split into cref and scope
  modes, which are exclusive.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61493 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-27 02:55:16 +00:00
nobu 5f0dca59a3 vm_eval.c: refactor eval_make_iseq
* vm_eval.c (eval_make_iseq): moved preparations of location and
  debug print.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61492 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-27 02:55:15 +00:00
nobu a1695d9c2c spec_helper.rb: must find libruby.so
* spec/ruby/optional/capi/spec_helper.rb (compile_extension): if
  libruby.so should have been built but is not found, fail early.
  get mtime of the library just once.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61491 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-27 01:58:18 +00:00
nobu 42c6ef00af fake.rb: set libdir
* tool/fake.rb: set "libdir" to build directory too, so that
  spec/ruby/optional/capi/spec_helper.rb can find libruby_so.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61490 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-27 01:26:22 +00:00
svn 79487218dd * 2017-12-27
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61489 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-27 00:04:30 +00:00
kazu c9bdee3e0d [DOC] Fix typos in downcase [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61488 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-27 00:04:30 +00:00
kazu 94fdb5e1d2 Add NEWS for Ruby 2.6.0
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61487 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-26 11:36:07 +00:00
kazu 8be1c6523d Move from NEWS to doc/NEWS-2.5.0
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61486 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-26 11:35:48 +00:00
nobu 60578d061a test_proc.rb: remove duplicate test_source_location
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61485 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-26 10:40:48 +00:00
nobu e973bde0d0 vm_method.c: fix super in refined module
* vm_method.c (rb_method_entry_complement_defined_class): clone
  the original method entry of refined module instance method with
  the active ICLASS, to track super method chain.
  [ruby-dev:50390] [Bug #14232]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61484 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-26 10:32:58 +00:00
nobu 3802fb92ff parse.y: warning for locations
* parse.y (gettable_gen): warn for __FILE__/__LINE__ when eval
  with binding only.  promote use of Binding#source_location
  instead.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61483 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-26 10:10:41 +00:00
nobu 62a3e7a33b vm_eval.c: strange message in eval
* vm_eval.c (eval_string_with_cref): remove unnecessary location
  from exception backtrace in eval.
  [ruby-core:84434] [Bug #14229]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61482 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-26 09:05:28 +00:00
mame 9e717416b4 test/ruby/test_proc.rb: Add a test for Binding#source_location
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61481 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-26 09:04:26 +00:00
mame 571e48b744 proc.c (bind_location): Add Binding#source_location
Fixes #14230

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61480 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-26 08:38:35 +00:00
nobu f6631c3096 variable.c: public rb_autoload
* variable.c (rb_autoload): restore the visibility for backward
  compatibility.  [ruby-core:84454] [Bug #14236]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61479 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-26 05:30:31 +00:00
nobu de11e472b4 prelude.c.tmpl: get rid of errors with old gcc
* template/prelude.c.tmpl: moved diagnostic pragmas outside
  prelude_eval() for very old gcc.  [ruby-core:84449] [Bug #14234]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61478 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-25 23:59:56 +00:00
svn fff3fd9a83 * 2017-12-26
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61477 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-25 23:33:53 +00:00
nobu 67fd07738d test/ruby/test_process.rb: get rid of timing issue
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61476 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-25 23:33:52 +00:00
k0kubun 65d3461e95 cont.c: fix comment to follow field name change
saved_thread was renamed to saved_ec in r59831 [ci skip]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61475 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-25 14:22:21 +00:00
matz 0af050993e version.h (RUBY_VERSION): 2.6.0 development has started.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61474 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-25 14:05:59 +00:00
nobu baa53f625d hash.c: prime2
* hash.c (prime2): turned into a uint32_t prime, as the lower
  32bits, non-prime part only was used always.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61473 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-25 12:41:52 +00:00
nobu ce52dfde9c hash.c: use uint128_t
* hash.c (mult_and_mix): use uint128_t instead of __uint128_t.
  [ruby-core:84438] [Bug #14231]

From: Nobuyoshi Nakada <nobu@ruby-lang.org>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61472 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-25 12:32:10 +00:00
nobu 8880af9a3b Use UINT128_T support flag from configure
Current check for __uint128_t in hash.c is not valid, since it ignores
compilers other than gcc. We hit this on lcc on e2k platform.

Configure script properly checks from 128-bit data types support and
sets HAVE_UINT128_T accordingly. This approach is already used within
ruby at bignum.c, random.c, etc.

Probably hash.c is an overlooked remnant of old days. This patch fixes
this.

[ruby-core:84438] [Bug #14231] [Fix GH-1781]
From: Andrew Savchenko <bircoph@altlinux.org>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61471 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-25 12:32:09 +00:00
naruse 135f24c06a Add ruby_2_5 branch to .travis.yml
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61470 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-25 07:56:46 +00:00
nobu 72ac5986bd irb.rb: fix highlight
* lib/irb.rb (IRB::Irb#eval_input): fix highlight for multiple
  lines exception messages.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61469 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-25 07:55:25 +00:00
nobu efee0c87c1 fix leaked fds
* lib/rubygems/command.rb (Gem::Command#invoke_with_build_args):
  restore UI and close the created SilentUI.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61465 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-25 05:54:27 +00:00
mame 2c74fe1106 doc/contributing.rdoc: Update platform maintainers
* mswin32 and Symbian OS are no longer supported
* Mac OS X was renamed

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61464 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-25 05:16:05 +00:00
ko1 d7c6776f7c Disasm output contains code range.
* iseq.c (iseq_inspect): show also code range information.
  Note that `iseq_inspect` is used only for header of disasm.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61463 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-25 04:40:42 +00:00
nobu 05d4ee8630 prelude.rb: block passing
* prelude.rb (Thread.exclusive): pass the block as a block
  argument.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61462 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-25 03:25:45 +00:00
kazu 1ef1557896 NEWS: Fix typos [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61461 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-25 03:01:07 +00:00
nobu d66f2d4443 prelude.c.tmpl: static literals
* template/prelude.c.tmpl (PRELUDE_STR): make string objects with
  static literals not to copy them.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61460 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-25 02:42:13 +00:00
nobu d9c76c5bd8 prelude.c.tmpl: fix optimization options
* template/prelude.c.tmpl (prelude_eval): fix optimization
  options.  trace_instruction member has been removed.  filled
  coverage_enabled and debug_level members instead.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61459 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-25 02:09:14 +00:00
hsbt 6c71bdbc85 Added gemification entry to NEWS file.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61458 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-25 00:33:19 +00:00
ko1 360c00572f Set first line numbers for empty iseqs.
* compile.c (iseq_compile_each): for empty method, block and so on,
  `last_line` is not set so that line number of `putnil` instruction
  will be zero. This patch set `first_lineno` for such `putnil`.

  Problem is reported by deivid-rodriguez via Yuichiro Kaneko.

* test/ruby/test_iseq.rb: add a test for this spec.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61457 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-25 00:27:17 +00:00
sorah 7361587fff NEWS: use of copy_file_range(2) isn't a new method
[ci skip]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61452 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-24 17:55:01 +00:00
k0kubun 6ea6e972b2 NEWS: move the section to note ERB performance
I heard that notable performance improvements should be written to
"Implementation Improvements". So I put the sentence here.

Also, the sentence itself is fixed to be the same as Ruby 2.5 release
note draft's one.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61451 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-24 17:20:04 +00:00
ko1 cbac40b3e5 Remove "trace_instruction" compile option.
* iseq.h (rb_compile_option_struct): trace instruction is removed so that
  remove the trace_instruction compile option.
  Don't show warning (just ignore) for Ruby 2.5.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61450 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-24 17:07:53 +00:00
svn 973e39a309 * 2017-12-25
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61449 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-24 16:43:17 +00:00
k0kubun 6915ffc99d NEWS: note about ERB's rendering performance
improvement.

There is no specific ticket for it, but improving the ERB's performance
was my largest passion that made me a Ruby committer.

See r58735, r58842, r58904, r58905, r58916.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61448 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-24 16:43:17 +00:00
mame 6585043231 NEWS: Add a brief explanation for branch and method coverage
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61447 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-24 14:52:23 +00:00
nobu 874da405bd fix grammatical mistake [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61446 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-24 10:12:21 +00:00
normal 5461fa37bd NEWS: updates for WEBrick [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61445 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-24 08:45:21 +00:00
normal acdbb5c0ec NEWS: fix typo [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61444 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-24 08:40:11 +00:00